User:Unicornisaurous/twinkleLoader.js

mw.loader.using( ['mediawiki.util','jquery.ui','jquery.tipsy'], function{       //mw.loader.load('//test.wikipedia.org/w/index.php?title=User:This,_that_and_the_other/morebits.js&action=raw&ctype=text/javascript');        mw.loader.load('//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-morebits.css&action=raw&ctype=text/css', 'text/css');        mw.loader.load('//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-morebits.js&action=raw&ctype=text/javascript');        setTimeout("mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Unicornisaurous/twinkle.js&action=raw&ctype=text/javascript')", 1000);  });

var Twinkle = {}; window.Twinkle = Twinkle; // allow global access

Twinkle.userAuthorized = true;

Twinkle.defaultConfig = {}; /** * Twinkle.defaultConfig.twinkle and Twinkle.defaultConfig.friendly * * This holds the default set of preferences used by Twinkle. (The |friendly| object holds preferences stored in the FriendlyConfig object.) * It is important that all new preferences added here, especially admin-only ones, are also added to * |Twinkle.config.sections| in twinkleconfig.js, so they are configurable via the Twinkle preferences panel. * For help on the actual preferences, see the comments in twinkleconfig.js. */ Twinkle.defaultConfig.twinkle = { // General summaryAd: " (TW)", deletionSummaryAd: " (TW)", protectionSummaryAd: " (TW)", userTalkPageMode: "window", dialogLargeFont: false, // ARV spiWatchReport: "yes", // Block blankTalkpageOnIndefBlock: false, // Fluff (revert and rollback) openTalkPage: [ "agf", "norm", "vand" ], openTalkPageOnAutoRevert: false, markRevertedPagesAsMinor: [ "vand" ], watchRevertedPages: [ "agf", "norm", "vand", "torev" ], offerReasonOnNormalRevert: true, confirmOnFluff: false, showRollbackLinks: [ "diff", "others" ], // DI (twinkleimage) notifyUserOnDeli: true, deliWatchPage: "default", deliWatchUser: "default", // PROD watchProdPages: true, prodReasonDefault: "", logProdPages: false, prodLogPageName: "PROD log", // CSD speedySelectionStyle: "buttonClick", watchSpeedyPages: [ "g3", "g5", "g10", "g11", "g12" ], markSpeedyPagesAsPatrolled: true, // these next two should probably be identical by default notifyUserOnSpeedyDeletionNomination:   [ "db", "g1", "g2", "g3", "g4", "g6", "g10", "g11", "g12", "g13", "a1", "a2", "a3", "a5", "a7", "a9", "a10", "a11", "f1", "f2", "f3", "f7", "f9", "f10", "u3", "u5", "t2", "t3", "p1", "p2" ], welcomeUserOnSpeedyDeletionNotification: [ "db", "g1", "g2", "g3", "g4", "g6", "g10", "g11", "g12", "g13", "a1", "a2", "a3", "a5", "a7", "a9", "a10", "a11", "f1", "f2", "f3", "f7", "f9", "f10", "u3", "u5", "t2", "t3", "p1", "p2" ], promptForSpeedyDeletionSummary: [ "db", "g1", "g2", "g3", "g4", "g6", "g7", "g8", "g10", "g11", "g12", "a1", "a2", "a3", "a5", "a7", "a9", "a10", "a11", "f2", "f4", "f7", "f8", "f10", "u5", "t2", "t3", "p1", "p2" ], openUserTalkPageOnSpeedyDelete: [ "db", "g1", "g2", "g3", "g4", "g5", "g10", "g11", "g12", "a1", "a3", "a7", "a9", "a10", "a11", "f3", "f7", "f9", "u3", "u5", "t2", "p1" ], deleteTalkPageOnDelete: false, deleteRedirectsOnDelete: true, deleteSysopDefaultToTag: false, speedyWindowHeight: 500, speedyWindowWidth: 800, logSpeedyNominations: false, speedyLogPageName: "CSD log", noLogOnSpeedyNomination: [ "u1" ], // Unlink unlinkNamespaces: [ "0", "10", "100", "118" ], // Warn defaultWarningGroup: "1", showSharedIPNotice: true, watchWarnings: true, customWarningList: [], // XfD xfdWatchDiscussion: "default", xfdWatchList: "no", xfdWatchPage: "default", xfdWatchUser: "default", markXfdPagesAsPatrolled: true, // Hidden preferences revertMaxRevisions: 50, batchdeleteChunks: 50, batchMax: 5000, batchProtectChunks: 50, batchundeleteChunks: 50, proddeleteChunks: 50 };

// now some skin dependent config. if ( mw.config.get( "skin" ) === "vector" ) { Twinkle.defaultConfig.twinkle.portletArea = "right-navigation"; Twinkle.defaultConfig.twinkle.portletId  = "p-twinkle"; Twinkle.defaultConfig.twinkle.portletName = "TW"; Twinkle.defaultConfig.twinkle.portletType = "menu"; Twinkle.defaultConfig.twinkle.portletNext = "p-search"; } else { Twinkle.defaultConfig.twinkle.portletArea = null; Twinkle.defaultConfig.twinkle.portletId  = "p-cactions"; Twinkle.defaultConfig.twinkle.portletName = null; Twinkle.defaultConfig.twinkle.portletType = null; Twinkle.defaultConfig.twinkle.portletNext = null; }

Twinkle.defaultConfig.friendly = { // Tag groupByDefault: true, watchTaggedPages: true, watchMergeDiscussions: true, markTaggedPagesAsMinor: false, markTaggedPagesAsPatrolled: true, tagArticleSortOrder: "cat", customTagList: [], // Welcome topWelcomes: false, watchWelcomes: true, welcomeHeading: "Welcome", insertHeadings: true, insertUsername: true, insertSignature: true, // sign welcome templates, where appropriate quickWelcomeMode: "norm", quickWelcomeTemplate: "welcome", customWelcomeList: [], customWelcomeSignature: true, // Talkback markTalkbackAsMinor: true, insertTalkbackSignature: true, // always sign talkback templates talkbackHeading: "Talkback", adminNoticeHeading: "Notice", mailHeading: "You've got mail!", // Shared markSharedIPAsMinor: true };

Twinkle.getPref = function twinkleGetPref( name ) { var result; if ( typeof Twinkle.prefs === "object" && typeof Twinkle.prefs.twinkle === "object" ) { // look in Twinkle.prefs (twinkleoptions.js) result = Twinkle.prefs.twinkle[name]; } else if ( typeof window.TwinkleConfig === "object" ) { // look in TwinkleConfig result = window.TwinkleConfig[name]; }

if ( result === undefined ) { return Twinkle.defaultConfig.twinkle[name]; }	return result; };

Twinkle.getFriendlyPref = function twinkleGetFriendlyPref(name) { var result; if ( typeof Twinkle.prefs === "object" && typeof Twinkle.prefs.friendly === "object" ) { // look in Twinkle.prefs (twinkleoptions.js) result = Twinkle.prefs.friendly[ name ]; } else if ( typeof window.FriendlyConfig === "object" ) { // look in FriendlyConfig result = window.FriendlyConfig[ name ]; }

if ( result === undefined ) { return Twinkle.defaultConfig.friendly[ name ]; }	return result; };

Twinkle.addPortlet = Twinkle.addPortletLink = function {};

//importScript("User:This, that and the other/tests.js");