Difference between revisions of "MediaWiki:Common.js"
From NSWiki
(save html) |
(remove extra js) |
||
Line 7: | Line 7: | ||
ga('create', 'UA-47265691-1', 'nswiki.org'); | ga('create', 'UA-47265691-1', 'nswiki.org'); | ||
ga('send', 'pageview'); | ga('send', 'pageview'); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
$(document).ready(function() { | $(document).ready(function() { | ||
Line 77: | Line 13: | ||
$("#firstHeading span").html(split[split.length - 1]); | $("#firstHeading span").html(split[split.length - 1]); | ||
document.title = $("#firstHeading span").html(); | document.title = $("#firstHeading span").html(); | ||
− | |||
− | |||
− | |||
} | } | ||
$("iframe").each(function() { | $("iframe").each(function() { | ||
Line 88: | Line 21: | ||
$("#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"); | $("#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"); | ||
}); | }); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 19:20, 26 January 2014
(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"); });