Difference between revisions of "MediaWiki:Common.js"
(Google Analytics code) |
(TranslateNoPageTitle - I seriously doubt whether this could work, but it's worth a try. (Anyone stuck with IE 9 may still see Google translate page titles, who cares!)) |
||
Line 2: | Line 2: | ||
{{MediaWiki:GoogleAnalytics.js}} | {{MediaWiki:GoogleAnalytics.js}} | ||
+ | |||
+ | function TranslateNoPageTitle(){ | ||
+ | var oH1 = document.getElementById("FirstHeading"); | ||
+ | if(oH1}{ | ||
+ | oH1.classList.add("notranslate"); | ||
+ | oH1.setAttribute("translate", "no"); | ||
+ | oH1.setAttribute("lang", "en";} | ||
+ | } | ||
+ | $(TranslateNoPageTitle); |
Revision as of 08:14, 4 May 2020
/* Any JavaScript here will be loaded for all users on every page load. */ {{MediaWiki:GoogleAnalytics.js}} function TranslateNoPageTitle(){ var oH1 = document.getElementById("FirstHeading"); if(oH1}{ oH1.classList.add("notranslate"); oH1.setAttribute("translate", "no"); oH1.setAttribute("lang", "en";} } $(TranslateNoPageTitle);