<!DOCTYPE html>
<html>
  <head>
    <title>External Provider</title>
    <link href="https://korap.ids-mannheim.de/instance/test/css/kalamar-plugin-latest.css" type="text/css" rel="stylesheet" />
    <script data-server="{{ .korapServer }}" src="https://korap.ids-mannheim.de/instance/test/js/korap-plugin-latest.js"></script>
  </head>
  <body>
    <h1>External Provider</h1>
    <section style="background-color: #fefefe">
      <p id="buy">...</p>
    </section>
    <script defer=""><!--
      "use strict";
      
      function pluginit(P) {
      
        P.resize();
      
        // Request metadata from the embedding match
        P.requestMsg(
          {
            'action':'get',
            'key':'textSigle'
          }, function (d) {
            var textSigle = d.value.value;
            var xhttp = new XMLHttpRequest();
            xhttp.onload = function() {
              if (this.status === 404) {
                document.getElementById("buy").innerHTML = "External provider unknown."
              } else {
                var ret = this.responseText.split(",");
                document.getElementById("buy").innerHTML = "You can buy this text from <a target=\"_blank\" href=\"" + ret[1] + "\" class=\"external\">" + ret[0] + "</a>.";
              }
              P.resize();
            }
            xhttp.open("GET", textSigle, true);
            xhttp.send();
          }
        );
      
        if (window.dynCall) {
          window.dynCall(P)
        };
      
        // Set plugin object globally
        window.Plugin = P;
      
      };
      -->
      </script>
  </body>
</html>
