Template:ReportABug: Difference between revisions

From MaRDI portal
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 1: Line 1:
<span class="doi-badge"><span class="doi-badge-part doi-label" data-tippy-content="Report a bug!" style="background-color: red !important;">Report a bug</span><span class="doi-badge-part doi-number"><link itemprop="identifier" href="{{{1}}}" />[{{{1}}}?report_a_bug {{{2}}}]</span></span><input type="text" id="bug-text" placeholder="Describe the issue..." style="margin-left: 0.5em; padding: 0.2em; display: inline-block; max-width: 300px;" />
<span class="doi-badge"><span class="doi-badge-part doi-label" data-tippy-content="Report a bug!" style="background-color: red !important;">Report a bug</span><span class="doi-badge-part doi-number"><link itemprop="identifier" href="{{{1}}}" />[{{{1}}}?report_a_bug {{{2}}}]</span></span>
 
{{#tag:html|
  <input type="text" id="bug-text" placeholder="Describe the issue..." style="margin-left: 0.5em; padding: 0.2em; max-width: 300px;" />
  <script>
    document.addEventListener("DOMContentLoaded", function () {
      const badge = document.getElementById("bug-badge");
      const input = document.getElementById("bug-text");
      if (badge && input) {
        badge.addEventListener("click", function () {
          const base = "{{{1}}}";
          const message = encodeURIComponent(input.value);
          const url = base + "?report_a_bug=True&text=" + message;
          window.location.href = url;
        });
      }
    });
  </script>
}}

Revision as of 20:17, 2 June 2025

Report a bug[{{{1}}}?report_a_bug {{{2}}}]

<html>

 <input type="text" id="bug-text" placeholder="Describe the issue..." style="margin-left: 0.5em; padding: 0.2em; max-width: 300px;" />
 <script>
   document.addEventListener("DOMContentLoaded", function () {
     const badge = document.getElementById("bug-badge");
     const input = document.getElementById("bug-text");
     if (badge && input) {
       badge.addEventListener("click", function () {
         const base = "{{{1}}}";
         const message = encodeURIComponent(input.value);
         const url = base + "?report_a_bug=True&text=" + message;
         window.location.href = url;
       });
     }
   });
 </script>

</html>