Template:PopupLink: Difference between revisions

From lotico
Jump to navigation Jump to search
No edit summary
Tag: Reverted
Replaced content with "[{{{1|#}}} {{{2|Click here}}}]"
Tags: Replaced Manual revert
 
Line 1: Line 1:
<includeonly>
[{{{1|#}}} {{{2|Click here}}}]
[{{{1|#}}} {{{2|Click here}}}]
<script>
document.addEventListener('DOMContentLoaded', function() {
  var links = document.querySelectorAll('a[href="{{{1|#}}}"]');
  links.forEach(function(link){
    link.onclick = function(e){
      e.preventDefault();
      window.open(link.href, '{{{4|_self}}}');
    };
  });
});
</script>
</includeonly>
<noinclude>
Usage: {{PopupLink|URL|Link Text|Popup Text|Target}}
Target can be _blank, _top, etc.
</noinclude>

Latest revision as of 22:05, 6 September 2025

[# Click here]