MediaWiki:Common.js: Difference between revisions
(Created page with '→Any JavaScript here will be loaded for all users on every page load.: /** Collapsible tables ********************************************************* * * Description: Al…') |
No edit summary Tag: Manual revert |
||
(187 intermediate revisions by 10 users not shown) | |||
Line 1: | Line 1: | ||
/* | /* Add Adobe Analytics Tracking Details 2022-11-17 */ | ||
/ | // First listen to an event that is fired when the FS object is available | ||
window.addEventListener('ExReady', function(){ | |||
// Call setTimeout to avoid a flaw in FS that triggers infinite recursion | |||
setTimeout(function(){ | |||
// Now configure the page data and manually trigger the page view | |||
FS.Analytics.updatePageViewData({ | |||
page_channel: 'Wiki', | |||
page_detail: 'Wiki Test' | |||
function | }); | ||
FS.Analytics.trackPageView(); | |||
}); | |||
}); | |||
/* End Adobe Analytics Tracking Details */ | |||
/* Fix for <imagemap>s to prevent them from resizing */ | |||
$( document ).ready(function() { | |||
$('[usemap]').each(function() { | |||
$(this).css('min-width', parseInt($(this).attr('width'))); | |||
}); | |||
}); | |||
/* Add obvious background color to Beta */ | |||
if (document.location.origin.indexOf("beta") > -1) { | |||
document.getElementById("mw-head").style.backgroundColor = "#ffb3b3"; | |||
} | } | ||
Latest revision as of 13:30, 5 December 2024
/* Add Adobe Analytics Tracking Details 2022-11-17 */
// First listen to an event that is fired when the FS object is available
window.addEventListener('ExReady', function(){
// Call setTimeout to avoid a flaw in FS that triggers infinite recursion
setTimeout(function(){
// Now configure the page data and manually trigger the page view
FS.Analytics.updatePageViewData({
page_channel: 'Wiki',
page_detail: 'Wiki Test'
});
FS.Analytics.trackPageView();
});
});
/* End Adobe Analytics Tracking Details */
/* Fix for <imagemap>s to prevent them from resizing */
$( document ).ready(function() {
$('[usemap]').each(function() {
$(this).css('min-width', parseInt($(this).attr('width')));
});
});
/* Add obvious background color to Beta */
if (document.location.origin.indexOf("beta") > -1) {
document.getElementById("mw-head").style.backgroundColor = "#ffb3b3";
}