Difference between revisions of "MediaWiki:Common.js"

From HPC Guide
Jump to navigation Jump to search
(Created page with "→‎Any JavaScript here will be loaded for all users on every page load.: <script> nl_lang = "en"; nl_pos = "bl"; </script> <script src="https://hpcguide.tau.ac.il/nagish/nag...")
 
 
Line 1: Line 1:
 
/* Any JavaScript here will be loaded for all users on every page load. */
 
/* Any JavaScript here will be loaded for all users on every page load. */
<script>
+
// Set global variables before loading the script
nl_lang = "en";
+
window.nl_lang = "en";
nl_pos = "bl";
+
window.nl_pos = "bl";
</script>
+
 
<script src="https://hpcguide.tau.ac.il/nagish/nagishli.js?v=2.3" charset="utf-8" defer></script>
+
// Load the Nagishli widget script
 +
var nagishScript = document.createElement('script');
 +
nagishScript.src = "https://hpcguide.tau.ac.il/nagish/nagishli.js?v=2.3";
 +
nagishScript.charset = "utf-8";
 +
nagishScript.defer = true;
 +
document.head.appendChild(nagishScript);

Latest revision as of 10:23, 26 March 2025

/* Any JavaScript here will be loaded for all users on every page load. */
// Set global variables before loading the script
window.nl_lang = "en";
window.nl_pos = "bl";

// Load the Nagishli widget script
var nagishScript = document.createElement('script');
nagishScript.src = "https://hpcguide.tau.ac.il/nagish/nagishli.js?v=2.3";
nagishScript.charset = "utf-8";
nagishScript.defer = true;
document.head.appendChild(nagishScript);