User:Jeserator/global.js

importScriptPage('User:Monchoman45/ChatHacks.js', 'c');

// AbuseLogRC abuseLogRC_interval = 10; abuseLogRC_entries = 1; abuseLogRC_position = 'before'; abuseLogRC_collapsible = true; abuseLogRC_userInfo = true;

// AjaxBatchDelete window.batchDeleteDelay = 100;

// AjaxRC window.ajaxPages = ["Special:RecentChanges","Special:Log","Special:Images",]; window.ajaxRefresh = 10000;

// FastDelete var fdButtons = []; fdButtons[fdButtons.length] = { 'summary': 'Unused', 'label': 'Unused' };

// FileUsageAuto-update LIRoptions = { editSummary: 'Updating file link (automatic)', singleButtonText: 'Rename and replace', queueButtonText: 'Rename and add to queue' }

// LastEdited window.lastEdited = { avatar: false, size: false, diff: true, comment: false, time: 'timeago', lang: 'en', namespaces: { include: [], exclude: [] },   pages: [] };

// MultiUpload var MultiUploadoption = { max: 100, defaultlicence:'CopyrightedGame' };

// PreloadFileDescription PFD_license = 'Copyrighted Game';

// Editing scripts importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:AjaxBatchDelete.js',        'u:dev:AjaxPatrol/code.js',        'u:dev:AjaxRC/code.js',        'u:kocka:MediaWiki:AjaxThreadDelete/code.js',        'u:dev:AnchoredRollback/code.js',        'u:dev:DisplayClock/code.js',        'u:dev:MediaWiki:FileUsageAuto-update/code.js',        'u:dev:FixWantedFiles/code.js',        'u:dev:LastEdited/code.js',        'u:dev:MediaWiki:MassBlock/code.js',        'u:dev:MediaWiki:MultiUpload/code.js',        'u:dev:PreloadFileDescription.js',        'u:dev:MediaWiki:RedirectManagement/code.js',        'u:dev:MediaWiki:RevealAnonIP/usercode.js',        'u:dev:TopEditors/code.js',        'u:dev:WHAM/code.2.js',    ] })

// Navigation Bar Chat Button var blub = $('.wds-tabs__tab-label a[data-tracking="forum"]').length > 0 ? "forum" : "discuss"; $('.wds-tabs__tab-label a[data-tracking="' + blub + '"]').attr("href", "/wiki/Special:Chat").attr("target", "_blank").find("span").text("Chat");

// VERecentChanges // Written by Penguin-Pal

if (mw.config.get("wgCanonicalSpecialPageName") == "WikiActivity") { $(".activity-nav > ul").prepend('VisualEditor RC'); }

if (mw.config.get("wgTitle") == "VERecentChanges" && mw.config.get("wgNamespaceNumber") == -1) {

$("head title").html("Recent VisualEditor Activity - Club Penguin Wiki - The free, editable encyclopedia about Club Penguin");

$("#mw-content-text").html(' ');

$("#rcvisualeditor").html(	'\n' +		'\thide patrolled &bull;' +		'\tRequest size:  &bull;' +		'\tSince days ago:  &bull;' +		'\t\n' +		'\t \n' +		'\t\n' +	' ' );

mw.util.addCSS(	'#rcvisualeditor-feed li {\n' +		'\tlist-style: none;\n' +	'}' +	'#rcvisualeditor-feed > li > ul {\n' +		'\tdisplay: none;\n' +	'}' +	'#rcvisualeditor-feed > li.rcvisualeditor-shown > ul {\n' +		'\tdisplay: block;\n' +	'}' +	'#rcvisualeditor-feed .rcvisualeditor-chevron{' +		'\tdisplay: inline-block;\n' +		'\rmargin-right: 6px;\n' +		'\tborder-width: 5px 0 5px 9px;\n' +		'\tborder-color: transparent transparent transparent #333;\n' +		'\tborder-style: solid;\n' +		'\tcursor: hand;\n' +		'\tcursor: pointer;\n' +	'}' +	'#rcvisualeditor-feed > li.rcvisualeditor-shown .rcvisualeditor-chevron {\n' +		'\rmargin-right: 5px;\n' +		'\tborder-width: 9px 5px 0 5px;\n' +		'\tborder-color: #333 transparent transparent transparent;\n' +	'}' );

$("#rcve-go").click(function {	function enc(s) {		return s.replace(/ /g, "_").replace(/[^\/]/g, function(m) { return encodeURIComponent(m); });	}	function encHTML(s) {		var a = {			"&": "amp",			"<": "lt",			">": "gt"		};		return s.replace(/&<>/g, function(m) { return "&" + a[m] + ";"; });	}	$(this).attr("disabled", "disabled");	$.getJSON("/api.php?action=query&format=json&list=recentchanges&rcprop=timestamp|title|ids|flags|tags|patrolled|ids|user|timestamp|sizes&rctag=visualeditor&rctype=edit&rclimit=" + $("#rcve-limit").val + "&rcend=" + (new Date(new Date.getTime - $("#rcve-since").val * 86400000).toJSON.split(".")[0].replace(/\D/g,"")) + ($("#rcve-hidepatrolled:checked").length == 1 ? "&rcshow=!patrolled" : "") + "&cb=" + new Date.getTime, function(data) { $("#rcve-go").removeAttr("disabled"); console.log(data); window.a = data; var list = {}, markup = $(' '); function parseItems(parent) { var output = ""; for (var i in parent) { output += (					'' +						(typeof parent[i].patrolled !== "string" ? '! ' : '') +						parent[i].time +						' (diff | hist</a>) .. <span class="mw-plusminus-' + (parent[i].len > 0 ? "pos" : parent[i].len < 0 ? "neg" : "null") + '" title="' + parent[i].newlen.toLocaleString + ' bytes after change">(' + (parent[i].len > 0 ? "+" : "") + parent[i].len.toLocaleString + ') .. ' + encHTML(parent[i].user) + '</a>' +					'</li>'				); }			return "" + output + "</ul>"; }		for (var i in data.query.recentchanges) { var a = data.query.recentchanges[i]; if (typeof list[a.title] === "undefined") { list[a.title] = []; }			list[a.title].push({				title: a.title,				user: a.user,				curid: a.pageid,				oldid: a.old_revid,				revid: a.revid,				patrolled: a.patrolled,				rcid: a.rcid,				len: a.newlen - a.oldlen,				newlen: a.newlen,				time: a.timestamp.match(/\d{4}\-\d{2}\-\d{2}/)[0] + ", " + a.timestamp.match(/\d{2}\:\d{2}/)[0]			}); }		console.log(list); for (var i in list) { markup.append(				'' + encHTML(i) + '</a>: ' + list[i].length + ' change' + (list[i].length == 1 ? "" : "s") + ':\n' + parseItems(list[i]) + '</li>'			); }		$(markup).children(":has(.unpatrolled)").each(function {			$(this).prepend('! ');		});		$(markup).children.each(function {			$(this).prepend(' ');		}); $("#rcvisualeditor-feed").html($(markup).html); $("#rcvisualeditor-feed .rcvisualeditor-chevron").click(function {			$(this).parent.toggleClass("rcvisualeditor-shown");		}); }).error(function { $("#rcve-go").removeAttr("disabled"); alert("Some error has occured"); }); });

}

// old FastDelete /** * Ajax Fast Delete * * @author Splarka * @author Uberfuzzy * @author Grunny * * @version 2.3 */

/*global jQuery, mediaWiki */

"use strict";
 * (function (window, $, mw, undefined) {

window.dev = window.dev || {}; // Don't load twice... if (window.dev.ajaxFastDelete !== undefined) { return false; }

var conf = mw.config.get([           'wgNamespaceNumber',            'wgPageName',            'skin'        ]),

self = { version: '2.3',

init: function {

if (conf.wgNamespaceNumber === -1 || !window.fdButtons || !$('#ca-delete').length) { return; }               var deleteButtons = '';

switch (conf.skin) { case 'uncyclopedia': case 'wowwiki': case 'monobook': deleteButtons = window.fdButtons.map(function (b) {                           var sum = b.summary;                            return '' + b.label + '</a></li>';                        }).join('');

$('#p-cactions > .pBody > ul').append(deleteButtons); break;

case 'oasis': case 'wikia': var $profile = $('.UserProfileActionButton'); deleteButtons = window.fdButtons.map(function (b) {                           var sum = b.summary;                            return '' + b.label + '</a>';                        }).join(' ');

if ($profile.exists) { $profile.append(deleteButtons); } else if ($('.page-header__subtitle-blog-post').exists) { $('.page-header__subtitle-blog-post').append(deleteButtons); $('.page-header__blog-post-details').css('margin-right', '5px'); } else { $('.page-header__title').append(deleteButtons); mw.util.addCSS('a[data-id="fastdelete"]:nth-child(1){margin-left:5px}'); }

break; }

if ($('a[data-id="fastdelete"]').length) { $('a[data-id="fastdelete"]').click(function {                       self.deletePage($(this).attr('data-summary'));                    }); }               mw.hook('fastdelete.init').fire(deleteButtons); },

deletePage: function (deleteReason) { (new mw.Api) .post({                       action: 'delete',                        title: conf.wgPageName,                        reason: deleteReason,                        token: mw.user.tokens.get('editToken')                    }) .done(function (res) {                       location.reload;                    }); }       };

window.dev.ajaxFastDelete = self;

mw.loader.using(['mediawiki.util', 'mediawiki.api'], function {        $(self.init);    });

}(window, jQuery, mediaWiki));

// old AbuseLogRC // ====================== //     AbuseLog in RC // ====================== /* Originally created by "User:Suppa chuppa" on http://runescape.wikia.com/wiki/User:Suppa_chuppa/abuselog.js    Edited and improved by User:leviathan_89 api documentation: /api.php?query=list example: http://community.wikia.com/api.php?action=query&list=abuselog&afllimit=4&afldir=older&aflprop=ids|filter|user|title|result|timestamp|details|hidden&format=jsonfm (remove "|details" from the query if you do not have the rights) thnx Nanaki for the help!

$(function {   //    // Configuration    //

// MediaWiki data var data = { mw: mw.config.get([              'wgCanonicalSpecialPageName',               'wgUserLanguage',               'wgUserName'            ]), ug: mw.config.get('wgUserGroups').join(' ') };   // Run condition if ( typeof window.abuseLogRCactive !== 'undefined' ) { return; }   if ( data.mw.wgCanonicalSpecialPageName != 'Recentchanges' ) { console.log('[AbuseLogRC]: page is not RecentChanges.'); return; }   window.abuseLogRCactive = true; console.log('[AbuseLogRC]: version 1.03 - 15/12/2017.'); // Configuration var config = { interval: (typeof abuseLogRC_interval === 'number') ? Math.max(5, abuseLogRC_interval) : 60, showTo: (typeof abuseLogRC_showTo === 'string') ? abuseLogRC_showTo : 'sysop', entries: (typeof abuseLogRC_entries === 'number') ? Math.max(1, abuseLogRC_entries) : 3, order: (typeof abuseLogRC_order === 'string' ) ? abuseLogRC_order : 'newer', timeFrame1: (typeof abuseLogRC_timeFrame1 === 'number' ) ? abuseLogRC_timeFrame1 * 3600000 : 2 * 3600000, timeFrame2: (typeof abuseLogRC_timeFrame2 === 'number' ) ? abuseLogRC_timeFrame2 * 3600000 : 12 * 3600000, timeFrame3: (typeof abuseLogRC_timeFrame3 === 'number' ) ? abuseLogRC_timeFrame3 * 3600000 : 24 * 3600000, position: (typeof abuseLogRC_position === 'string' ) ? abuseLogRC_position : 'before', collapsible: (typeof abuseLogRC_collapsible === 'boolean' ) ? abuseLogRC_collapsible : true, userInfo: (typeof abuseLogRC_userInfo === 'boolean' ) ? abuseLogRC_userInfo : true },       // Checking user rights userType = data.mw.wgUserName ? /(sysop|helper|vstf|staff)/.test(data.ug) ? 'sysop' : 'all' : 'none', customUser = window.abuseLogRC_users && window.abuseLogRC_users instanceof Array && window.abuseLogRC_users.indexOf(data.mw.wgUserName) > -1;

// Variables for functions var refreshTimer = null, refreshCycle = 0, itemSince = null, itemIds = [], i18n;

// END Configuration if ( config.showTo == userType || config.showTo == 'all' || customUser ) { importArticle({           type: 'script',            article: 'u:dev:MediaWiki:I18n-js/code.js'        }); } else { console.log('[AbuseLogRC]: user is not allowed to view AbuseLogRC.'); return; }

mw.hook('dev.i18n').add(function(i18no) {       // Check if AbuseFilter is enabled        callAPI({ meta: 'siteinfo', siprop: 'extensions', action: 'query' }, function(response) { var o = response.query.extensions, found = false; if ($.isArray(o)) { for ( var i = 0; i < o.length && !found; ++i ) { found = o[i].name === 'Abuse Filter'; }           }            if (found) { // If everything checks out, load needed MediaWiki messages and create table loadMessages([                   'activityindicator-message',                    'abusefilter-log',                    'abusefilter-log-linkoncontribs',                    'abusefilter-log-linkoncontribs-text',                    'abusefilter-log-summary',                    'abusefilter-action-block',                    'abusefilter-action-blockautopromote',                    'abusefilter-action-degroup',                    'abusefilter-action-disallow',                    'abusefilter-examine-title',                    'abusefilter-history-public',                    'abusefilter-history-timestamp',                    'abusefilter-history-user',                    'abusefilter-action-rangeblock',                    'abusefilter-action-tag',                    'abusefilter-action-throttle',                    'abusefilter-action-warn',                    'abusefilter-changeslist-examine', 'abusefilter-edit-builder-vars-tor-exit-node', 'abusefilter-edit-builder-vars-user-age', 'abusefilter-edit-warn-actions', 'blocklink', 'contribslink', 'talkpagelinktext' ]).then(loadI18n(i18no)).then(createTableHTML);           } else {                console.log('[AbuseLogRC]: AbuseFilter is not enabled.');            }        }); });

//   // Functions //   // Get MediaWiki messages // @return instance of jQuery.Promise // https://www.mediawiki.org/wiki/Manual:Messages_API#Getting_the_messages_to_the_client function loadMessages(messages) { return new mw.Api.get({           action: 'query',            meta: 'allmessages',            ammessages: messages.join( '|' ),            amlang: data.mw.wgUserLanguage        }).then( function ( data ) {            $.each( data.query.allmessages, function ( i, message ) { if ( message.missing !== '' ) { mw.messages.set( message.name, message['*'] ); }           });        });    }    function loadI18n(i18no) { // This is hacky but eh       return function { return i18no.loadMessages('AbuseLogRC') .then(function(i18nData) {                   i18n = i18nData;                }); };   }    // Call API function callAPI(data, callback) { data.format = 'json'; // add the format to the given data query data.action = 'query';

$.getJSON(mw.util.wikiScript('api'), data) .done(function(response) {               if (response.error) {                    $('#abErrorsLog ul')                        .empty   // clears errors log                        .append($('', {                            text: new Date.toLocaleTimeString + ' - ' +                                  i18n.msg('apiError').plain + ' ' +                                  response.error.info                        }));                } else {                    callback(response);                }            }) .error(function(xhr, error) {               $('#abErrorsLog ul')                    .empty      // clears errors log                    .append($('', {                        text: new Date.toLocaleTimeString + ' - ' +                              i18n.msg('ajaxError').plain + ' ' +                              error                    }));            }); }   // Converts number of seconds in time string function secondsToString(seconds, mode){ var d = (Math.floor(seconds / 86400) > 0) ? Math.floor(seconds / 86400) + 'd ' : '', h = (Math.floor((seconds % 86400) / 3600) > 0) ? Math.floor((seconds % 86400) / 3600) + 'h ' : '', m = (Math.floor(((seconds % 86400) % 3600) / 60) > 0) ? Math.floor(((seconds % 86400) % 3600) / 60) + 'm ' : '', s = ((seconds % 86400) % 3600) % 60 + 's'; if (seconds < 300 && mode != 'timestamp'){ return i18n.msg('newAccount').escape; } else { return d + h + m + s;        } }   // Change table sorting function changeOrder{ if (config.order == 'older') { // Change to 'newer' config.order = 'newer'; $('#abSorting').empty.text('↓'); refreshData; } else { // Change to 'older' config.order = 'older'; $('#abSorting').empty.text('↑'); refreshData; }   }    // Add urgency class function urgencyClass(timeNew, timeOld) { timeDifference = timeNew - timeOld; if (timeDifference <= config.timeFrame1) { return 'abUrgency1'; } else { if (timeDifference <= config.timeFrame2) { return 'abUrgency2'; } else { if (timeDifference <= config.timeFrame3) { return 'abUrgency3'; } else { return 'abUrgency4'; }           }        }    }    // Change number of entries function updateEntriesNumber(number) { if ( !isNaN(number) ) { config.entries = Math.max(1, number); refreshData; }   }    // load Complete - sets the auto-refresh time interval function loadComplete { if ($('#abAutoRefresh:checked').length) { window.clearTimeout(refreshTimer); refreshTimer = window.setTimeout(loadData, config.interval * 1000); }       // Update last update status $('#ab_update img').hide; $('#abLastUpdate').text((new Date).toLocaleTimeString); }

// Change auto-refresh time interval function updateIntervalTime(number) { if ( !isNaN(number) ) { // Change interval config.interval = Math.max(5, number);

// Update text $('#abAutoRefreshText').text(i18n.msg('autoRefresh', config.interval).plain); // Restart cycle loadData; }   }    // Refresh Data - clears the table and reset everything function refreshData{ $('#abHeader').nextAll.remove;     // clears table rows $('#abErrorsLog ul').empty;          // clears errors log refreshCycle = 0;                      // reset refresh cycle control itemIds = []; itemSince = null; loadData; }   // loadData - load new data for the table function loadData { // Show loading image $('#ab_update img').show; // Define query var itemQuery; if ( userType == 'sysop' ) { itemQuery = { 'afllimit': config.entries, 'afldir': 'older', 'action': 'query', 'list': 'abuselog', 'aflprop': 'ids|user|title|action|result|filter|timestamp|details|hidden' };       } else { itemQuery = { 'afllimit': config.entries, 'afldir': 'older', 'action': 'query', 'list': 'abuselog', 'aflprop': 'ids|user|title|action|result|filter|timestamp|hidden' };       }        // Select only new items if (itemSince) { itemQuery.itemend = itemSince; }       // Get data callAPI(itemQuery, function(response) {           for (var i in response.query.abuselog) {                var item = response.query.abuselog[i];                // Remove duplicates which may occur during autorefresh                if ($.inArray(item.id, itemIds) > -1) {                    continue;                }                if(itemIds.length >= config.entries) {                    refreshData;                }                itemIds.push(item.id);                // Time                // query timestamps are UTC in ISO format                var now  = new Date,                    then = new Date(item.timestamp),                    date = then.toLocaleDateString,                    time = then.toLocaleTimeString;                // Set time limit for next requests                itemSince = item.timestamp;                // Create item details if viewer has permission, checks with personal configuration and item is not an anon var tableUserTOR, tableUserExtraLinks; if ( userType == 'sysop' && config.userInfo && (/(user)/.test(item.details.user_groups)) ) { var userAge = secondsToString(item.details.user_age); // Create extra info tableUserTOR = ( item.details.tor_exit_node != '0' ) ? '<span title="' + mw.msg('abusefilter-edit-builder-vars-tor-exit-node') + '">TOR &bull; ' : ''; tableUserExtraLinks = ' (' + tableUserTOR + i18n.msg('globalEdits').escape + ' ' + item.details.user_editcount + ' &bull; <span title="' + mw.msg('abusefilter-edit-builder-vars-user-age') + '">' + i18n.msg('age').escape + ' ' + userAge + ' )' + ' '; } else { tableUserExtraLinks = ''; }               // Create cells HTML var tableCellTime = '<td rowspan="2" class="abItemTime" >' + date + ' ' + time + ' '; var tableCellPage = '<td class="abItemPage">' + '' + item.title + '</a>' + ' ' + ' (' +                               '' +  mw.msg('abusefilter-changeslist-examine') + '</a>' +                                 ' &bull; ' + mw.msg('abusefilter-edit-warn-actions') + ' ' + mw.msg('abusefilter-action-' + item.result) + ')' + ' ' +                       ' ';                var tableCellUser = '<td class="abItemUser">' + '' + item.user + '</a> ' + tableUserExtraLinks + ' ';               var tableCellFilter = '<td class="abItemFilterID">' + '' + i18n.msg('triggeredFilter').escape + ' ' + item.filter_id + '</a>' + ' - ' +                            ''+ item.filter + '</a>' + ' ';               var tableCellTools = '<td class="abItemTools">&raquo; ' + '<a href="' + mw.util.getUrl('User_talk:' + item.user) + '" target="_blank">' + mw.msg('talkpagelinktext') + '</a> &bull; ' + '<a href="' + mw.util.getUrl('Special:Contributions/' + item.user) + '" target="_blank">' + mw.msg('contribslink') + '</a> &bull; ' + '<a href="/wiki/Special:AbuseLog?wpSearchUser=' + item.user + '" title="' + mw.msg('abusefilter-log-linkoncontribs-text') + '" target="_blank">' + mw.msg('abusefilter-log-linkoncontribs') + '</a> &bull; ' + '<a href="//vstf.wikia.com/" target="_blank" title="' + i18n.msg('vstfTooltip').escape + '">VSTF</a> &bull; ' + '<a href="' + mw.util.getUrl('Special:Block/' + item.user) + '" target="_blank">' + mw.msg('blocklink') + '</a>' + ' ';               // Create table row HTML var urgency = urgencyClass(now.getTime, then.getTime), timeDiff = Math.floor( (now.getTime - then.getTime) / 1000 ), // debugging purpose tableRow = '<tr class="abItemRow ' + urgency + '" data-time-ago="' + secondsToString(timeDiff, 'timestamp') + '">' + tableCellTime + tableCellPage + tableCellUser + ' ' +                       '<tr class="abItemRow ' + urgency + '">' + tableCellFilter + tableCellTools + ' ';               // Insert row in table if (config.order == 'older') { $('#abHeader').after(tableRow); } else { $('#abData').append(tableRow); }           }        });        // After some auto-refresh do an hard refresh to update the HTML if there weren't any new items in a while        if ( refreshCycle >= 60 ) {            refreshCycle = 0;            refreshData;        } else {            refreshCycle++;            loadComplete;        }    }    // CreateHTML body    function createTableHTML {

// Create table container and place it       var container = '<div id="ab_options"> <div id="ab_main"> '; if (config.position == 'after') { $('#mw-content-text').after(container); } else { $('#mw-content-text').before(container); }       // Table options $('#ab_options').empty.append(           ' ' +                ' ' + i18n.msg('optionsHeader').escape + ' ' +                ' ' +                    ' ' +                        '<input type="checkbox" id="abAutoRefresh" checked="checked" /> <label for="abAutoRefresh" id="abAutoRefreshText">' + i18n.msg('autoRefresh', config.interval).escape + ' ' +                        ' <input type="text" name="abIntervalTime" id="abIntervalTime" style="width:50px;"> ' +                        '<input type="button" id="abSetIntervalButton" value="' + i18n.msg('changeButton').escape + '">' +                        '<input type="button" id="abRefresh" title="' + i18n.msg('refreshButtonDesc').escape + '" value="' + i18n.msg('refreshButton').escape + '" style="margin-left:5px;">' +                        '<div id="ab_update" style="float:right;">' +                            '<img src="//images.wikia.com/common/skins/common/images/ajax.gif" width="16" height="16" alt="' + mw.msg('activityindicator-message') + '"/> ' + ' ' + i18n.msg('lastUpdate').escape + ' ' + ' ' +                   ' ' +                ' ' +                ' ' +                    ' ' +                        i18n.msg('changeNumber').escape + ' <input type="text" name="abEntriesNumber" id="abEntriesNumber" style="width:50px;"> ' + '<input type="button" id="abSetEntriesButton" value="' + i18n.msg('changeButton').escape + '">' + ' <a href="/wiki/Special:AbuseLog" target="_blank">' + mw.msg('abusefilter-log') + '</a> &bull; <a href="//dev.wikia.com/wiki/AbuseLogRC" target="_blank">' + i18n.msg('devLink').escape + '</a> ' + ' ' +               ' ' +                ' <ul></ul> ' + ' '       );        // Insert table in container        $('#ab_main').empty.append( ' '       );

// Add sorting icon if (config.order == 'older') { $('#abSorting').text('↑'); } else { $('#abSorting').text('↓'); }       // Bind functions $('#abRefresh').click(refreshData);                    // refresh button $('#abSetEntriesButton').click(function {               var newNumber = $('#abEntriesNumber').val;                updateEntriesNumber(newNumber);            }        );                                                      // entries button $('#abSetIntervalButton').click(function {               var newTime = $('#abIntervalTime').val;                updateIntervalTime(newTime);            }        );                                                      // refresh interval button $('#abHeader th:first').click(changeOrder);                    // sorting options // Make table collapsible if ( config.collapsible ) { $('#ab_main table.mw-collapsible').makeCollapsible; }       // Get data loadData; }   // End functions });