blob: 7c707c9a8211ed9888100e08e5328eae8fc85e2a [file] [log] [blame]
Akron5e1252e2022-12-19 17:57:56 +01001<!DOCTYPE html>
2<html>
3 <head>
Akronebdfa002022-12-20 13:48:33 +01004 <title>External Provider</title>
Akron8d25e1e2022-12-20 16:00:38 +01005 <script data-server="{{ .korapServer }}" src="https://korap.ids-mannheim.de/instance/test/js/korap-plugin-latest.js"></script>
Akron5e1252e2022-12-19 17:57:56 +01006 </head>
7 <body>
Akron9baa3eb2022-12-20 20:24:24 +01008 <h1>External Provider</h1>
9 <section>
10 <p id="buy">...</p>
11 </section>
Akron8d25e1e2022-12-20 16:00:38 +010012 <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>
Akron5e1252e2022-12-19 17:57:56 +010048 </body>
49</html>