2 * Enable double-click-to-edit functionality.
5 if ( Number( mw.user.options.get( 'editondblclick' ) ) !== 1 ) {
6 // Support both 1 or "1" (T54542)
10 if ( mw.config.get( 'wgAction' ) !== 'view' ) {
11 // Only trigger during view action.
16 $( '#mw-content-text' ).on( 'dblclick', ( e ) => {
17 // Trigger native HTMLElement click instead of opening URL (T45052)
18 const $a = $( '#ca-edit a' );
19 // Not every page has an edit link (T59713)