MediaWiki:Common.js: Difference between revisions
MediaWiki interface page
More actions
No edit summary Tags: Mobile edit Mobile web edit |
No edit summary Tags: Mobile edit Mobile web edit |
||
| Line 450: | Line 450: | ||
var COMMON = (SV.common = SV.common || {}); | var COMMON = (SV.common = SV.common || {}); | ||
var UPOP_VERSION = | // Bumped only because we changed positioning margins (safe cache-bust). | ||
var UPOP_VERSION = 32; // Universal Popups v3.2 | |||
if (typeof COMMON.universalPopupsInit === "number" && COMMON.universalPopupsInit >= UPOP_VERSION) return; | if (typeof COMMON.universalPopupsInit === "number" && COMMON.universalPopupsInit >= UPOP_VERSION) return; | ||
COMMON.universalPopupsInit = UPOP_VERSION; | COMMON.universalPopupsInit = UPOP_VERSION; | ||
| Line 749: | Line 750: | ||
var vw = window.innerWidth || document.documentElement.clientWidth || 0; | var vw = window.innerWidth || document.documentElement.clientWidth || 0; | ||
var vh = window.innerHeight || document.documentElement.clientHeight || 0; | var vh = window.innerHeight || document.documentElement.clientHeight || 0; | ||
var margin = 10; | |||
var gap = 12; | // CHANGE (safe): stricter edge padding on small screens | ||
var tight = vw <= 520; | |||
var margin = tight ? 18 : 10; | |||
var gap = tight ? 14 : 12; | |||
var pr = el.getBoundingClientRect(); | var pr = el.getBoundingClientRect(); | ||