MediaWiki:Common.js: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* Force viewport meta for mobile responsiveness */ | |||
(function() { | |||
var existing = document.querySelector('meta[name="viewport"]'); | |||
if (existing) { | |||
existing.setAttribute('content', 'width=device-width, initial-scale=1'); | |||
} else { | |||
var meta = document.createElement('meta'); | |||
meta.name = 'viewport'; | |||
meta.content = 'width=device-width, initial-scale=1'; | |||
document.head.appendChild(meta); | |||
} | |||
})(); | |||
/* Force main menu to be pinned on desktop */ | /* Force main menu to be pinned on desktop */ | ||
$(document).ready(function() { | $(document).ready(function() { | ||
| Line 19: | Line 32: | ||
} | } | ||
} | } | ||
}); | |||