blob: bb854e05e5cc3d84ffe4489950a0b1a95e7d3a76 [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();
Akron8d25e1e2022-12-20 16:00:38 +010028 xhttp.onload = function() {
Akronc2d2d3b2022-12-21 11:29:59 +010029 if (this.status === 404) {
30 document.getElementById("buy").innerHTML = "External provider unknown."
31 } else {
32 var ret = this.responseText.split(",");
Akron9a75a542022-12-21 12:11:40 +010033 document.getElementById("buy").innerHTML = "You can buy this text from <a target=\"_blank\" href=\"" + ret[1] + "\" class=\"external\">" + ret[0] + "</a>.";
Akronc2d2d3b2022-12-21 11:29:59 +010034 }
Akron8d25e1e2022-12-20 16:00:38 +010035 P.resize();
36 }
37 xhttp.open("GET", textSigle, true);
38 xhttp.send();
39 }
40 );
41
42 if (window.dynCall) {
43 window.dynCall(P)
44 };
45
46 // Set plugin object globally
47 window.Plugin = P;
48
49 };
50 -->
51 </script>
Akron5e1252e2022-12-19 17:57:56 +010052 </body>
53</html>