Difference between revisions of "MediaWiki:Common.js"

From Rollaclub
Jump to: navigation, search
(Created page with "Any JavaScript here will be loaded for all users on every page load.: // install Wikipedia:User:Cacycle/wikEd in-browser text editor importScriptURI('//en.wikipedia....")
 
m
Line 4: Line 4:
 
importScriptURI('//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js'
 
importScriptURI('//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js'
 
+ '&action=raw&ctype=text/javascript');
 
+ '&action=raw&ctype=text/javascript');
 +
 +
 +
  var _gaq = _gaq || [];
 +
  _gaq.push(['_setAccount', 'UA-4902547-1']);
 +
  _gaq.push(['_trackPageview']);
 +
 +
  (function() {
 +
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
 +
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
 +
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
 +
  })();

Revision as of 01:45, 18 September 2012

/* Any JavaScript here will be loaded for all users on every page load. */

// install [[Wikipedia:User:Cacycle/wikEd]] in-browser text editor
importScriptURI('//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js'
+ '&action=raw&ctype=text/javascript');


  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-4902547-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();