Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Any JavaScript here will be loaded for all users on every page load. */
- //<nowiki>
- //Ajax refresh
- var ajaxPages = ["Special:RecentChanges", "Special:Watchlist", "Special:Log", "Special:Contributions", "Forum:Yew_Grove", "RuneScape:Active_discussions", "Special:AbuseLog", "Special:NewFiles", "Category:Speedy_deletion_candidates", "Category:Speedy_move_candidates", "Special:Statistics", "Special:NewPages", "Special:ListFiles", "Special:Log/move"];
- var AjaxRCRefreshText = 'Auto-refresh';
- importScriptPage('MediaWiki:Common.js/ajaxrefresh.js','rs');
- var _Hasync= _Hasync|| [];
- _Hasync.push(['Histats.start', '1,2235373,4,603,110,40,"00000010"']);
- _Hasync.push(['Histats.fasi', '1']);
- _Hasync.push(['Histats.track_hits', '']);
- (function() {
- var hs = document.createElement('script');
- hs.type = 'text/javascript';
- hs.async = true;
- hs.src = ('http://s10.histats.com/js15_as.js');
- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(hs); })();
- //Switch Infobox
- if ($('.switch-infobox').length) {
- importScriptPage('User:-Matt/SwitchInfobox.js', 'runescape');
- importStylesheetPage('User:-Matt/SwitchInfobox.css', 'runescape');
- }
- // AWB (In browser)
- importScriptURI('//en.wikipedia.org/w/index.php?title=User:Joeytje50/AWB.js/load.js&action=raw&ctype=text/javascript');
- //Highlight tables
- if ($( '.lighttable' ).length) {
- importScriptPage('MediaWiki:Common.js/highlightTable.js', 'runescape');
- }
- // Automatic file fixing
- if (wgPageName.indexOf("Special:MovePage/File:") != -1 || (wgCanonicalNamespace == "File" && Storage)){
- LIRoptions = {
- bottomMessage: 'This appears below the buttons on Special:MovePage',
- editSummary: 'Updating file link (automatic)',
- singleButtonText: 'Rename and replace',
- queueButtonText: 'Rename and add to queue'
- }
- importScriptPage("FileUsageAuto-update/code.js", "dev");
- }
- // Unchecks redirects when moving files
- if (wgPageName.indexOf("Special:MovePage/File:") != -1) {
- $('input#wpLeaveRedirect').removeAttr('checked');
- }
- if ((wgUserGroups||[]).indexOf('sysop')!=-1) {
- var autoWelcomeText = '{{subst:Welcome|~~~~}}', autoWelcomeSummary = '';
- importScriptPage('User:Quarenon/autowelcome.js','rs');
- }
- importArticles( {
- type: 'script',
- articles: [
- // ...
- 'u:dev:MiniComplete/code.js',
- 'MediaWiki:Common.js/compare.js',
- 'u:dev:DISPLAYTITLE/code.js',
- 'MediaWiki:Common.js/youtube.js',
- 'MediaWiki:Wikia.js/sidebar.js'
- // ...
- ]
- } );
- //calc.js import from main RSWiki
- if ($('.jcConfig').length) {
- importScriptPage('MediaWiki:Common.js/calc.js', 'rs');
- importStylesheetPage('MediaWiki:Common.css/calc.css', 'rs');
- }
- /**
- * Moves topright icons to be inserted into Wikia pageheader
- * Requires additional CSS in [[MediaWiki:Wikia.css]]
- *
- * @author The 888th Avatar (Avatar Wiki)
- * @author Cqm
- * @author Joeytje50
- */
- if ($('.topright-icon').length) {
- (function () {
- // insert container next to tally in pageheader
- $('<div>').attr('id', 'rs-header-icons').insertBefore($('.tally'));
- var $icons = $('#rs-header-icons');
- $('.topright-icon').each(function () {
- $icons.append($(this).html());
- });
- })();
- }
- window._gaq = window._gaq || [];
- _gaq.push(['local._setAccount', 'UA-60460114-1']);
- _gaq.push(['local._trackPageview']);
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
- var util = {
- /**
- * Adds commas to a number string
- *
- * @example 123456.78 -> 123,456.78
- *
- * @param num {number|string} A number to add commas to
- *
- * @returns {string} The number with commas
- */
- addCommas: function (num) {
- num += '';
- var x = num.split('.'),
- x1 = x[0],
- x2 = x.length > 1
- ? '.' + x[1]
- : '',
- rgx = /(\d+)(\d{3})/;
- while (rgx.test(x1)) {
- x1 = x1.replace(rgx, '$1,$2');
- }
- return x1 + x2;
- }
- }
- if($('#XPEach, #GEPrice, #killXP').length) {
- importScript("MediaWiki:Common.js/monstercalc.js");
- }
- // GE Price charts
- if($('.GEdatachart').length) {
- importScript("MediaWiki:Common.js/GECharts.js");
- }
Advertisement
Add Comment
Please, Sign In to add comment