Jump to content

User:SarekOfVulcan/monobook.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// Very effective wikibreak enforcer, it works by removing your edit token. Can be reversed with twinkle
//function wikibreak()
//  {
//  document.body.innerHTML = document.body.innerHTML.replace(/token=/g, "toking="); // Disable rollback
//  handle_token('wpEditToken'); // Disable everything else
//  function handle_token(token_name)
//    {
//    var token = document.getElementsByName(token_name)[0];
//    if (token == null)
//      {
//      return false;
//      }
//    token.value = "";
//    }
//  }
//today = new Date();
//if (today.getHours() >= 8 
//      && today.getHours() < 18 
//    && today.getDay() >= 1 
//      && today.getDay() <= 5)
//  {
//  addOnloadHook(wikibreak);
//  }

function addDash() {
loLogoutNode = document.getElementById("pt-logout");
loDashNode = mw.util.addPortletLink( "p-personal"
        , mw.config.get('wgServer') + mw.config.get('wgScriptPath') + "/index.php?title=User:" + mw.config.get('wgUserName') + "/Dashboard"
        , "My dashboard"
        , "pt-admindash"
        , "Link to dashboard"
        , "d"
        , loLogoutNode );
}
$(addDash);

importScript("User:Lupin/recent2.js");

//Twinkle scripts
TwinkleConfig = {
        revertMaxRevisions              :       50,
        userTalkPageMode                :       'window',
        showSharedIPNotice              :       true,
        openTalkPage                    :       [ 'agf', 'norm', 'vand' ],
        openTalkPageOnAutoRevert        :       false,
        openAOLAnonTalkPage             :       false,
        summaryAd                       :       " using [[WP:TWINKLE|TW]]",
        deletionSummaryAd               :       " using [[WP:TWINKLE|TW]]",
        protectionSummaryAd             :       " using [[WP:TWINKLE|TW]]",
        watchSpeedyPages                :       [ 'g3', 'g5', 'g10', 'g11', 'g12' ],
        watchProdPages                  :       true,
        openUserTalkPageOnSpeedyDelete  :       [ 'g1', 'g2', 'g10', 'g11', 'g12', 'a1', 'a7', 'i3', 'i4', 'i5', 'i6', 'i7', 'u3', 't1' ],
        watchRevertedPages              :       [],
        markRevertedPagesAsMinor        :       [ 'agf', 'norm', 'vand', 'torev' ],
        deleteTalkPageOnDelete          :       false,
        watchWarnings                   :       false,
        markAIVReportAsMinor            :       true,
        markSpeedyPagesAsMinor          :       true,
        offerReasonOnNormalRevert       :       true,
        orphanBacklinksOnSpeedyDelete   :       {orphan:false, exclude:['g6']}
};
importScript('User:AzaToth/twinkle.js');

FriendlyConfig = {
        summaryAd                       :       " using [[WP:FRIENDLY|Friendly]]",
        topWelcomes                     :       true,
        watchWelcomes                   :       false,
        markWelcomesAsMinor             :       false,
        insertHeadings                  :       true,
        welcomeHeading                  :       "== Welcome ==",
        insertUsername                  :       true,
        insertSignature                 :       true,
        quickWelcomeTemplate            :       "Welcome5",
        groupByDefault                  :       true,
        watchTaggedPages                :       true,
        markTaggedPagesAsMinor          :       false,
        enableClock                     :       false
};
importScript('User:Ioeth/friendly.js');
importScript('User:AWeenieMan/furme.js');
importScript('User:Smith609/toolbox.js');
importScript('User:Splarka/temused.js');
importScript('User:Splarka/sysopdectector.js');