Akron | 5e1252e | 2022-12-19 17:57:56 +0100 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
Akron | de33179 | 2023-01-10 11:36:15 +0100 | [diff] [blame^] | 4 | <title>External Resources</title> |
Akron | 3af88ae | 2022-12-21 11:20:00 +0100 | [diff] [blame] | 5 | <link href="https://korap.ids-mannheim.de/instance/test/css/kalamar-plugin-latest.css" type="text/css" rel="stylesheet" /> |
Akron | 8d25e1e | 2022-12-20 16:00:38 +0100 | [diff] [blame] | 6 | <script data-server="{{ .korapServer }}" src="https://korap.ids-mannheim.de/instance/test/js/korap-plugin-latest.js"></script> |
Akron | 5e1252e | 2022-12-19 17:57:56 +0100 | [diff] [blame] | 7 | </head> |
| 8 | <body> |
Akron | b911f9e | 2022-12-21 12:23:27 +0100 | [diff] [blame] | 9 | <h1>Full Text</h1> |
Akron | 9e76933 | 2022-12-21 11:25:38 +0100 | [diff] [blame] | 10 | <section style="background-color: #fefefe"> |
Akron | 9baa3eb | 2022-12-20 20:24:24 +0100 | [diff] [blame] | 11 | <p id="buy">...</p> |
| 12 | </section> |
Akron | 8d25e1e | 2022-12-20 16:00:38 +0100 | [diff] [blame] | 13 | <script defer=""><!-- |
| 14 | "use strict"; |
| 15 | |
| 16 | function pluginit(P) { |
| 17 | |
| 18 | P.resize(); |
| 19 | |
| 20 | // Request metadata from the embedding match |
| 21 | P.requestMsg( |
| 22 | { |
| 23 | 'action':'get', |
| 24 | 'key':'textSigle' |
| 25 | }, function (d) { |
| 26 | var textSigle = d.value.value; |
| 27 | var xhttp = new XMLHttpRequest(); |
Akron | 8d25e1e | 2022-12-20 16:00:38 +0100 | [diff] [blame] | 28 | xhttp.onload = function() { |
Akron | c2d2d3b | 2022-12-21 11:29:59 +0100 | [diff] [blame] | 29 | if (this.status === 404) { |
Akron | b911f9e | 2022-12-21 12:23:27 +0100 | [diff] [blame] | 30 | document.getElementById("buy").innerHTML = "External provider unknown. No full text available." |
Akron | c2d2d3b | 2022-12-21 11:29:59 +0100 | [diff] [blame] | 31 | } else { |
| 32 | var ret = this.responseText.split(","); |
Akron | b911f9e | 2022-12-21 12:23:27 +0100 | [diff] [blame] | 33 | document.getElementById("buy").innerHTML = "You can access full text from <a target=\"_blank\" href=\"" + ret[1] + "\" class=\"external\">" + ret[0] + "</a>."; |
Akron | c2d2d3b | 2022-12-21 11:29:59 +0100 | [diff] [blame] | 34 | } |
Akron | 8d25e1e | 2022-12-20 16:00:38 +0100 | [diff] [blame] | 35 | P.resize(); |
| 36 | } |
| 37 | xhttp.open("GET", textSigle, true); |
| 38 | xhttp.send(); |
| 39 | } |
| 40 | ); |
| 41 | |
| 42 | if (window.dynCall) { |
| 43 | window.dynCall(P) |
| 44 | }; |
| 45 | |
| 46 | // Set plugin object globally |
| 47 | window.Plugin = P; |
| 48 | |
| 49 | }; |
| 50 | --> |
| 51 | </script> |
Akron | 5e1252e | 2022-12-19 17:57:56 +0100 | [diff] [blame] | 52 | </body> |
| 53 | </html> |