X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/mediawiki.git/blobdiff_plain/19e297c21b10b1b8a3acad5e73fc71dcb35db44a..6932310fd58ebef145fa01eb76edf7150284d8ea:/resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js diff --git a/resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js b/resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js deleted file mode 100644 index 5a7c777f..00000000 --- a/resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * JavaScript to enable right click edit functionality - */ -$( function() { - // Select all h1-h6 elements that contain editsection links - $( 'h1:has(.editsection a), ' + - 'h2:has(.editsection a), ' + - 'h3:has(.editsection a), ' + - 'h4:has(.editsection a), ' + - 'h5:has(.editsection a), ' + - 'h6:has(.editsection a)' - ).live( 'contextmenu', function( e ) { - // Get href of the [edit] link - var href = $(this).find( '.editsection a' ).attr( 'href' ); - // Check if target is the anchor link itself. If so, don't suppress the context menu; this - // way the reader can still do things like copy URL, open in new tab etc. - var $target = $( e.target ); - if ( !$target.is( 'a' ) && !$target.parent().is( '.editsection' ) ){ - window.location = href; - e.preventDefault(); - return false; - } - } ); -} );