MediaWiki:Gadget-ReferenceTooltips.js:修订间差异
创建页面,内容为“// See mw:Reference Tooltips // Source https://en.wikipedia.org/wiki/MediaWiki:Gadget-ReferenceTooltips.js →eslint space-in-parens: ["error", "always"], array-bracket-spacing: ["error", "always"]: ( function () { // If you're loading the script from another wiki and want to set your settings, do that in `window` // properties with `rt_` prefix, e.g. // window.rt_REF_LINK_SELECTOR = '...'; // They will be used instead of enwiki detaults. var REF_LINK_…” |
小无编辑摘要 |
||
(未显示同一用户的2个中间版本) | |||
第413行: | 第413行: | ||
} ); | } ); | ||
this.clickOption = new OO.ui.RadioOptionWidget( { | |||
label: mw.msg( 'rt-clicking' ) | |||
} ); | |||
this.hoverOption = new OO.ui.RadioOptionWidget( { | this.hoverOption = new OO.ui.RadioOptionWidget( { | ||
label: mw.msg( 'rt-hovering' ) | label: mw.msg( 'rt-hovering' ) | ||
} ); | } ); | ||
this.activationMethodSelect = new OO.ui.RadioSelectWidget( { | this.activationMethodSelect = new OO.ui.RadioSelectWidget( { | ||
items: [ this.hoverOption, this.clickOption ] | items: [ this.hoverOption, this.clickOption ] | ||
第897行: | 第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". | ||
第905行: | 第907行: | ||
} else { | } else { | ||
enabled = true; | enabled = true; | ||
delay = | 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). |