blob: bf50dd187e83a36c55bbd82820d4e38424aac020 [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>
Akron3af88ae2022-12-21 11:20:00 +01005 <link href="https://korap.ids-mannheim.de/instance/test/css/kalamar-plugin-latest.css" type="text/css" rel="stylesheet" />
Akron8d25e1e2022-12-20 16:00:38 +01006 <script data-server="{{ .korapServer }}" src="https://korap.ids-mannheim.de/instance/test/js/korap-plugin-latest.js"></script>
Akron5e1252e2022-12-19 17:57:56 +01007 </head>
8 <body>
Akron9baa3eb2022-12-20 20:24:24 +01009 <h1>External Provider</h1>
Akron9e769332022-12-21 11:25:38 +010010 <section style="background-color: #fefefe">
Akron9baa3eb2022-12-20 20:24:24 +010011 <p id="buy">...</p>
12 </section>
Akron8d25e1e2022-12-20 16:00:38 +010013 <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() {
Akron4fae8742022-12-21 11:20:13 +010030 var ret = this.responseText.split(",");
Akron8d25e1e2022-12-20 16:00:38 +010031 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>
Akron5e1252e2022-12-19 17:57:56 +010049 </body>
50</html>