Akron | 5e1252e | 2022-12-19 17:57:56 +0100 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
Akron | ebdfa00 | 2022-12-20 13:48:33 +0100 | [diff] [blame] | 4 | <title>External Provider</title> |
Akron | 8d25e1e | 2022-12-20 16:00:38 +0100 | [diff] [blame^] | 5 | <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] | 6 | </head> |
| 7 | <body> |
Akron | 74dbfe0 | 2022-12-20 13:41:59 +0100 | [diff] [blame] | 8 | <p id="buy">...</p> |
Akron | 8d25e1e | 2022-12-20 16:00:38 +0100 | [diff] [blame^] | 9 | <script defer=""><!-- |
| 10 | "use strict"; |
| 11 | |
| 12 | function pluginit(P) { |
| 13 | |
| 14 | P.resize(); |
| 15 | |
| 16 | // Request metadata from the embedding match |
| 17 | P.requestMsg( |
| 18 | { |
| 19 | 'action':'get', |
| 20 | 'key':'textSigle' |
| 21 | }, function (d) { |
| 22 | var textSigle = d.value.value; |
| 23 | var xhttp = new XMLHttpRequest(); |
| 24 | console.log("Loading ..."); |
| 25 | xhttp.onload = function() { |
| 26 | var ret = his.responseText.split(","); |
| 27 | document.getElementById("buy").innerHTML = "You can buy this text from <a href=\"" + ret[1] + "\" class=\"external\">" + ret[0] + "</a>."; |
| 28 | P.resize(); |
| 29 | } |
| 30 | xhttp.open("GET", textSigle, true); |
| 31 | xhttp.send(); |
| 32 | } |
| 33 | ); |
| 34 | |
| 35 | if (window.dynCall) { |
| 36 | window.dynCall(P) |
| 37 | }; |
| 38 | |
| 39 | // Set plugin object globally |
| 40 | window.Plugin = P; |
| 41 | |
| 42 | }; |
| 43 | --> |
| 44 | </script> |
Akron | 5e1252e | 2022-12-19 17:57:56 +0100 | [diff] [blame] | 45 | </body> |
| 46 | </html> |