<!DOCTYPE html>
<html>
  <head>
    <title>External Resources</title>
    <link href="https://korap.ids-mannheim.de/css/kalamar-plugin-latest.css" type="text/css" rel="stylesheet" />
    <script data-server="{{ .korapServer }}" src="https://korap.ids-mannheim.de/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>
