MediaWiki:Gadget-ReferenceTooltips.js:修订间差异

无编辑摘要
无编辑摘要
 
(未显示同一用户的1个中间版本)
第413行: 第413行:
} );
} );


this.hoverOption = new OO.ui.RadioOptionWidget( {
this.clickOption = new OO.ui.RadioOptionWidget( {
label: mw.msg( 'rt-clicking' )
label: mw.msg( 'rt-clicking' )
} );
} );
this.clickOption = new OO.ui.RadioOptionWidget( {
this.hoverOption = new OO.ui.RadioOptionWidget( {
label: mw.msg( 'rt-hovering' )
label: mw.msg( 'rt-hovering' )
} );
} );
第898行: 第898行:
enabled = Boolean( Number( settings[ 0 ] ) );
enabled = Boolean( Number( settings[ 0 ] ) );
delay = Number( settings[ 1 ] );
delay = Number( settings[ 1 ] );
activatedByClick = Boolean( Number( settings[ 2 ] ) );
activatedByClick = true;
//activatedByClick = Boolean( Number( settings[ 2 ] ) );
// The forth value was added later, so we provide for a default value. See comments below
// The forth value was added later, so we provide for a default value. See comments below
// for why we use "IS_TOUCHSCREEN && IS_MOBILE".
// for why we use "IS_TOUCHSCREEN && IS_MOBILE".
第906行: 第907行:
} else {
} else {
enabled = true;
enabled = true;
delay = 200;
delay = 70;
// Since the mobile browser check is error-prone, adding IS_MOBILE condition here would probably
// Since the mobile browser check is error-prone, adding IS_MOBILE condition here would probably
// leave cases where a user interacting with the browser using touches doesn't know how to call
// leave cases where a user interacting with the browser using touches doesn't know how to call
// a tooltip in order to switch to activation by click. Some touch-supporting laptop users
// a tooltip in order to switch to activation by click. Some touch-supporting laptop users
// interacting by touch (though probably not the most popular use case) would not be happy too.
// interacting by touch (though probably not the most popular use case) would not be happy too.
activatedByClick = IS_TOUCHSCREEN;
activatedByClick = true;
//activatedByClick = IS_TOUCHSCREEN;
// Arguably we shouldn't convert native tooltips into gadget tooltips for devices that have
// Arguably we shouldn't convert native tooltips into gadget tooltips for devices that have
// mouse support, even if they have touchscreens (there are laptops with touchscreens).
// mouse support, even if they have touchscreens (there are laptops with touchscreens).