MediaWiki:Common.js: Difference between revisions

From Kshatriya Wiki
mNo edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
Line 10: Line 10:
gtag('js', new Date());
gtag('js', new Date());
gtag('config', 'G-5MQXEFVQBE');
gtag('config', 'G-5MQXEFVQBE');
/* Hide "View history" tab from anonymous users */
body:not(.loggedin) #ca-history {
    display: none !important;
}
/* Hide "Recent changes" link in sidebar for anonymous users */
body:not(.loggedin) a[title="Special:RecentChanges"] {
    display: none !important;
}

Revision as of 16:40, 28 June 2025

/* Any JavaScript here will be loaded for all users on every page load. */
// Google Analytics for GA4 (G-5MQXEFVQBE)
var gtagScript = document.createElement("script");
gtagScript.src = "https://www.googletagmanager.com/gtag/js?id=G-5MQXEFVQBE";
gtagScript.async = true;
document.head.appendChild(gtagScript);

window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-5MQXEFVQBE');