View source for MediaWiki:Common.js
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
var config = mw.config.values;
// Load site JS
[
'BetterUpload.js', // Improvements to Special:Upload
'BetterDiff.js' // Aids with patrolling and with diff viewing on RC, page history and user contribs
]
.forEach(function(scr){
importScript('MediaWiki:'+scr);
});
// Add navigational keybinds
mw.hook('wikipage.content').add(function(){
var actions = {
e: function(page){ return config.wgServer+mw.util.getUrl(page)+'?action=edit'; },
h: function(page){ return config.wgServer+mw.util.getUrl(page)+'?action=history'; },
m: function(page){ return config.wgServer+mw.util.getUrl('Special:MovePage/'+page); },
d: function(page){ return config.wgServer+mw.util.getUrl(page)+'?action=delete'; },
};
if (config.wgAction=='view') {
000
1:0
Return to MediaWiki:Common.js.