MediaWiki:Mobile.js: Difference between revisions
Created page with "→All JavaScript here will be loaded for users of the mobile site: // Make the Minerva/logo area link to the Main Page on small screens mw.hook('wikipage.content').add(function () { if (window.innerWidth <= 800 && !document.querySelector('.minerva-logo-link')) { var logo = document.querySelector('.minerva-logo, .mw-logo, .minerva-header .site-title'); if (logo && !logo.closest('a')) { var a = document.createElement('a'); a.href = mw.util.getUrl('..." |
m removed all menu hacks and test again |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
/* | /* Make the Minerva/logo area link to the Main Page on small screens */ | ||
mw.hook('wikipage.content').add(function () { | mw.hook('wikipage.content').add(function () { | ||
if (window.innerWidth <= 800 && !document.querySelector('.minerva-logo-link')) { | if (window.innerWidth <= 800 && !document.querySelector('.minerva-logo-link')) { | ||