User:Inductiveload/editOnCtrlClick.js

/*********************************************************************** * editOnCtrlClick.js * * If you click a link in the page body while pressing the crtl key, * you go to that page's edit action. **********************************************************************/

jQuery( document ).ready( function {

$('#bodyContent a').click( function(e){       if (e.ctrlKey) {            var page = $(this).attr('href').replace(/\/wiki\/(.*)/, '$1');            var editUrl = 'http:' + mw.config.get('wgServer') + mw.config.get('wgScript') + '?title=' + page + '&action=edit'            window.location.href = editUrl;            e.preventDefault;            e.stopPropagation;        }    }); });