Jump to content

User:Dsimic/common.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.
//
// Remove "rollback" links from the watchlist and contributions pages.
//
if ((mw.config.get('wgCanonicalSpecialPageName') === 'Watchlist')
    || (mw.config.get('wgCanonicalSpecialPageName') === 'Contributions')) {

    $('span.mw-rollback-link').remove();
}

//
// Hide the "Mark all pages as visited" watchlist button.
//
if (mw.config.get('wgCanonicalSpecialPageName') === 'Watchlist') {
    $('#mw-watchlist-resetbutton').remove();
    $('.mw-watched').contents().unwrap();
}

//
// Add a "Subpages" link to the left-hand-side toolbar.
//
mw.util.addPortletLink(
    'p-tb',
    mw.config.get('wgServer') + mw.config.get('wgArticlePath').replace("$1", "Special:PrefixIndex/" + wgPageName + "/"),
    'Subpages');

//
// Apply customizations to the wikEdDiff; see [[User:Cacycle/diff#Customization]]
// for more details.
//
var wikEdDiffConfig;

if (wikEdDiffConfig === undefined) {
    wikEdDiffConfig = {};
}

wikEdDiffConfig.coloredBlocks = true;

//
// Configure the behavior of the Navigation popups gadget;
// see [[Wikipedia:Tools/Navigation popups#Configuration (optional)]] for more details.
//
window.popupHistoricalLinks  = false;
window.popupOnlyArticleLinks = true;
window.popupTocLinks         = false;

window.popupSubpopups        = false;
window.popupPreviewHistory   = false;

window.popupImages           = false;
window.imagePopupsForImages  = false;