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 | 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 | 9baa3eb | 2022-12-20 20:24:24 +0100 | [diff] [blame] | 9 | <h1>External Provider</h1> |
| 10 | <section> |
| 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(); |
| 28 | console.log("Loading ..."); |
| 29 | xhttp.onload = function() { |
| 30 | var ret = his.responseText.split(","); |
| 31 | document.getElementById("buy").innerHTML = "You can buy this text from <a href=\"" + ret[1] + "\" class=\"external\">" + ret[0] + "</a>."; |
| 32 | P.resize(); |
| 33 | } |
| 34 | xhttp.open("GET", textSigle, true); |
| 35 | xhttp.send(); |
| 36 | } |
| 37 | ); |
| 38 | |
| 39 | if (window.dynCall) { |
| 40 | window.dynCall(P) |
| 41 | }; |
| 42 | |
| 43 | // Set plugin object globally |
| 44 | window.Plugin = P; |
| 45 | |
| 46 | }; |
| 47 | --> |
| 48 | </script> |
Akron | 5e1252e | 2022-12-19 17:57:56 +0100 | [diff] [blame] | 49 | </body> |
| 50 | </html> |