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