MediaWiki:Common.js
From NSWiki
Note: After saving, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Clear the cache in Tools → Preferences
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-47265691-1', 'nswiki.org'); ga('send', 'pageview'); $(document).ready(function() { if ($(".subpages").length > 0) { var split = $("#firstHeading span").html().split("/"); $("#firstHeading span").html(split[split.length - 1]); document.title = $("#firstHeading span").html(); } $("iframe").each(function() { if ($(this).attr("data-src") != null) { $(this).attr("src", $(this).attr("data-src")); } }); $("#pt-login a, #pt-anonlogin a").html("Log in with NationStates").attr("title", "Users must login to NSWiki with their NationStates account to edit pages").attr("href", "/NationStates:Login"); });