Jump to content

User:Aksi great/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.
// Helper tools
mw.loader.load(
             'https://wiki.riteme.site/w/index.php?title=User:Voice_of_All/Addtabs/monobook.js'
             + '&action=raw&ctype=text/javascript&dontcountme=s');
//

 //<nowiki> Admin tools
document.write('<script type="text/javascript" src="' 
             + 'http://wiki.riteme.site/w/index.php?title=User:Voice_of_All/admin/monobook.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

//</nowiki>[[Category:Wikipedia administrators who use VoA script|{{PAGENAME}}]]

// CSD AutoReason
importScript('User:^demon/csd.js');

//Twinkle

importScript('User:AzaToth/twinkle.js');

TwinkleConfig = {
        revertMaxRevisions              :       50,
        userTalkPageMode                :       'tab',
        showSharedIPNotice              :       true,
        openTalkPage                    :       [ 'agf', 'norm', 'vand' ],
        openTalkPageOnAutoRevert        :       false,
        summaryAd                       :       "",
        deletionSummaryAd               :       "",
        protectionSummaryAd             :       "",
        watchSpeedyPages                :       [],
        watchProdPages                  :       false,
        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:true, exclude:['g6']}
};

// {{commons ok}} tagger
function commonsOK() {
  if (document.editform) {
    document.editform.wpTextbox1.value += "\n{{commons ok}}";
    document.editform.wpSummary.value = "{{[[Template:commons ok|commons ok]]}}";
    document.editform.submit();
  } else
    document.location = mw.config.get('wgServer') + mw.config.get('wgScript') + "?title=" + wgPageName + "&action=edit&commonsOK=1";
}
function addCommonsOK(){
  if (wgCanonicalNamespace == "Image")
    mw.util.addPortletLink("p-cactions", "javascript:commonsOK()", "{{commons ok}}", "");
  if (document.location.href.indexOf("commonsOK=1") > 0)
    commonsOK();
}
$(addCommonsOK);