<!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>Full Text</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. No full text available."
              } else {
                var ret = this.responseText.split(",");
                document.getElementById("buy").innerHTML = "You can access full 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>
