User:Gamer Hour74(reserve)/common.js

//Delays,var and other things

//I'm horrible at coding sorry peridork var MultiUploadoption = { max: 20 }; window.ajaxRefresh = 500; window.ajaxPages = ["Special:RecentChanges","Special:Watchlist","Special:Log","Special:WikiActivity",]; massCategorizationDelay = 4000; // Automatic addition of User files (Thanks Dorumin) if (wgPageName == 'Special:Upload' || wgPageName == 'Special:MultipleUpload') { $('#wpUploadDescription').val; } if (wgAction !== 'edit' && window.location.href.match("/?veaction=edit$") === null) { setInterval(function { if ($('#ImageUploadLicense').length) { $('#ImageUploadLicense > option:first-of-type').val('Userfiles'); } }, 2000); } else if ( wgNamespaceNumber === 1201 ) { setInterval(function { if ($('#ImageUploadLicense').length) { $('#ImageUploadLicense > option:first-of-type').val('Userfiles'); } }, 2000); } if (wgPageName == 'Special:Images') { executed = false; setInterval(function { if (!executed) { if ($('textarea[name="wpUploadDescription"]').length) { executed = true; $('textarea[name="wpUploadDescription"]').val; } } }, 2000); } // User Files Button (Thanks Dorumin) $(function { if ( wgNamespaceNumber == 6 && !$('.categories').hasClass('ui-sortable')) { $('.wikinav2 .WikiaPageHeader').css('padding-right', '0'); $('#WikiaPageHeader .comments').after( 'User files ' ); $('#user-files').click(function { $('#CategorySelectAdd').click; setTimeout(function { $('#CategorySelectInput').val('User files').trigger(jQuery.Event('keydown', {which: 13})); setTimeout(function { $('#CategorySelectSave').click; }, 500); }, 500); }); } }); // Gallery Files Button (Thanks Dorumin) $(function { if ( wgNamespaceNumber == 6 && !$('.categories').hasClass('ui-sortable')) { $('.wikinav2 .WikiaPageHeader').css('padding-right', '0'); $('#WikiaPageHeader .comments').after( 'Gallery files ' ); $('#gallery-files').click(function { $('#CategorySelectAdd').click; setTimeout(function { $('#CategorySelectInput').val('Gallery files').trigger(jQuery.Event('keydown', {which: 13})); setTimeout(function { $('#CategorySelectSave').click; }, 500); }, 500); }); } }); /* Imports */ $(window).load(function {    importArticles({ type: "script", articles: [ 'u:embercastle:MediaWiki:AjaxUndo.js', 'u:dev:MediaWiki:Linksweeper/code.js', 'u:dev:MediaWiki:AnchoredRollback/code.js', 'u:dev:MediaWiki:MassCategorization/code.js', 'u:dev:MediaWiki:MultiUpload/code.js' ]    }); });