User:Mike Novikoff/global.js: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
goodbye yellow brick road
disable [Enter] in the [Edit summary], per WP:TECHPUMP
 
Line 19: Line 19:
//mw.loader.load("//en.wikipedia.org/w/index.php?title=User:Evad37/WikidataWatchlistLabels.js&action=raw&ctype=text/javascript");
//mw.loader.load("//en.wikipedia.org/w/index.php?title=User:Evad37/WikidataWatchlistLabels.js&action=raw&ctype=text/javascript");
}
}

// DON'T submit an edit when the cursor is placed in [Edit summary] and the Enter is (accidentally) hit
$(document).ready(function(){
$('input#wpSummary').keypress(function(e){
if(e.which==13) e.preventDefault();
});
});

Latest revision as of 23:30, 21 July 2022

/************************
** enwiki and wikidata **
************************/
if (/^(en|wikidata)wiki$/.test(mw.config.get('wgDBname'))) {
//
// A tool to set rollback link edit summary: [https://en.wikipedia.org/wiki/user:Mr.Z-man/rollbackSummary]
mw.loader.load('//en.wikipedia.org/w/index.php?title=user:Writ_Keeper/rollbackSummary.js&action=raw&ctype=text/javascript');
}

/**********************
** enwiki and ruwiki **
**********************/
if (/^(en|ru)wiki$/.test(mw.config.get('wgDBname'))) {
//
// 'Highlight duplicate links' tool. For the sake of WP:REPEATLINK.
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Evad37/duplinks-alt.js&action=raw&ctype=text/javascript');
//
// Adds labels to P-numbers and Q-numbers (properties and items) for Wikidata edits on watchlist
//mw.loader.load("//en.wikipedia.org/w/index.php?title=User:Evad37/WikidataWatchlistLabels.js&action=raw&ctype=text/javascript");
}

// DON'T submit an edit when the cursor is placed in [Edit summary] and the Enter is (accidentally) hit
$(document).ready(function(){
    $('input#wpSummary').keypress(function(e){
        if(e.which==13) e.preventDefault();
    });
});