Difference between revisions of "MediaWiki:Common.js"
(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!)) |
m (Where are my glasses...) |
||
Line 5: | Line 5: | ||
function TranslateNoPageTitle(){ | function TranslateNoPageTitle(){ | ||
var oH1 = document.getElementById("FirstHeading"); | var oH1 = document.getElementById("FirstHeading"); | ||
− | if(oH1 | + | if(oH1){ |
oH1.classList.add("notranslate"); | oH1.classList.add("notranslate"); | ||
oH1.setAttribute("translate", "no"); | oH1.setAttribute("translate", "no"); |
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);