MediaWiki:Common.js: Difference between revisions
No edit summary |
(analytics) |
||
Line 20: | Line 20: | ||
return tstring; | return tstring; | ||
} | } | ||
document.write('<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>'); | |||
_uacct = "UA-865962-2"; | |||
urchinTracker(); | |||
/*</pre>*/ | /*</pre>*/ |
Revision as of 16:44, 18 June 2007
/* Any JavaScript here will be loaded for all users on every page load. */ /*<pre>*/ //Fix bug in http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/skins/common/wikibits.js : //for the sorting order, take the whole number, not the number before the second comma. //Also, remove spaces. function ts_parseFloat(num) { if (!num) return 0; num = removeSpaces(num); num = parseFloat(num.replace(/,/g, "")); return (isNaN(num) ? 0 : num); } function removeSpaces(string) { var tstring = ""; string = '' + string; splitstring = string.split(" "); for(i = 0; i < splitstring.length; i++) tstring += splitstring[i]; return tstring; } document.write('<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>'); _uacct = "UA-865962-2"; urchinTracker(); /*</pre>*/