镜像自地址
https://github.com/wikimedia/mediawiki-extensions-TwoColConflict
已同步 2024-05-23 14:03:44 +08:00
Only count clicks on the copy link once
Bug: T256130 Change-Id: I6eb896ac19502ffcbb3b45b8a2b51ed352593237
这个提交包含在:
父节点
504ecf7620
当前提交
4c99ef7510
|
@ -38,6 +38,6 @@
|
|||
* **{PREFIX}.conflict.resolved.byUserEdits.under11.{AGGREGATION}** - Number of edit conflicts resolved by users with 0-10 edits
|
||||
|
||||
|
||||
* **{PREFIX}.copy.jsclick.{AGGREGATION}** - Total number of clicks of the link to copy the originally submitted text in-place
|
||||
* **{PREFIX}.copy.jsclick.{AGGREGATION}** - Total number of clicks of the link to copy the originally submitted text in-place ( multiple clicks from the same conflict will only be counted once )
|
||||
* **{PREFIX}.copy.special.load.{AGGREGATION}** - Total number of loads of the special page to show the originally submitted text
|
||||
* **{PREFIX}.copy.special.retrieved.{AGGREGATION}** - Total number of successfully retrieved texts from the cache on the special page to show the originally submitted text
|
||||
|
|
|
@ -429,6 +429,7 @@ function initSwapHandling() {
|
|||
*/
|
||||
function initSourceCopy() {
|
||||
var $copyLink = $( '.mw-twocolconflict-copy-link a' ),
|
||||
wasClicked = false,
|
||||
$confirmPopup, popupTimeout;
|
||||
if ( !$copyLink.length ) {
|
||||
return;
|
||||
|
@ -451,7 +452,11 @@ function initSourceCopy() {
|
|||
$( '.mw-twocolconflict-your-text' ).select();
|
||||
document.execCommand( 'copy' );
|
||||
|
||||
mw.track( 'counter.MediaWiki.TwoColConflict.copy.jsclick' );
|
||||
if ( !wasClicked ) {
|
||||
// only count once if the user clicks several times from the same screen
|
||||
mw.track( 'counter.MediaWiki.TwoColConflict.copy.jsclick' );
|
||||
wasClicked = true;
|
||||
}
|
||||
|
||||
$confirmPopup.toggle( true );
|
||||
popupTimeout = setTimeout( function () {
|
||||
|
|
正在加载...
在新工单中引用
屏蔽一个用户