MediaWiki:Gadget-SureSureSure.js: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
controllo per Safari; return valido anche per disablePatrolAjax |
|||
Riga 19:
var opts = $.extend( defaultOpts, window.sureSureSure );
var isIOS = /iPad|iPhone|iPod/.test( navigator.platform ); // Safari iOS pre 13
if (
opts.maxScreenWidth
opts.hasTouchScreen !== ) {
return;
mw.hook( 'wikipage.content' ).add( function () {▼
$( '.mw-rollback-link a' ).click( function ( event ) {▼
var yes = 'ok-guy-im-not-accidentally-clicking-this';▼
if( !$( this ).hasClass( yes ) && !window.sureSureSure._yetConfirmed ) {▼
var $t = $( this );▼
$t.addClass( yes ).text( $t.text() + ": " + opts.confirm );▼
event.preventDefault();▼
window.sureSureSure._yetConfirmed = true;▼
}▼
} );▼
} );▼
}
if ( opts.disablePatrolAjax ) {
|