User talk:Technical 13/Scripts/CVD.js

Latest comment: 5 years ago by Xaosflux in topic Requested edit 16 July 2018

Change to Tooltip edit

@Technical 13: A quick suggested change to support your new flags. Change:

if(copyvios === true && dupdet === true){var countURLs = ' (' + (uniqueURLs.length +1) + ')';}else if(copyvios === false && dupdet === true){var countURLs = ' (' + uniqueURLs.length + ')';}else if(copyvios === true && dupdet === false){var countURLs = ' (1)';}else{var countURLs = '';}
var toolTip = 'Scan for copyright violations in the ' + uniqueURLs.length + ' unique URL';
if(uniqueURLs.length !== 1){ toolTip += 's'; }
toolTip += ' detected using Earwig\'s Copyvio Detector & Derrick Coetzee\'s Duplication Detector tools.  (';
if(uniqueURLs.length > 9){ toolTip += 'WARNING: '; }
toolTip += 'This will open ' + (uniqueURLs.length +1) + ' new tabs/windows.)';

to

if(copyvios === true && dupdet === true){
    var countURLs = uniqueURLs.length + 1;
    var toolTipTool += 'using Earwig\'s Copyvio Detector & Derrick Coetzee\'s Duplication Detector tools.';
}else if(copyvios === false && dupdet === true){
    var countURLs = uniqueURLs.length;
    var toolTipTool += 'using Derrick Coetzee\'s Duplication Detector tool.';
}else if(copyvios === true && dupdet === false){
    var countURLs = 1;
    var toolTipTool += 'using Earwig\'s Copyvio Detector tool.';
}else{
    var countURLs = '';
    var toolTipTool = '';
}
var toolTip = 'Scan for copyright violations in the ' + uniqueURLs.length + ' unique URL';
if(uniqueURLs.length !== 1){ toolTip += 's'; }
toolTip += ' detected ' + toolTipTool + '  (';
if(uniqueURLs.length > 9){toolTip += 'WARNING: ';}
toolTip += 'This will open ' + (countURLs) + ' new ';
if(countURLs !== 1){toolTip += 'tabs/windows.)';}else{toolTip += 'tab/window.)';}
if(countURLs !== ''){countURLs = ' (' + countURLs + ')';}

--Ahecht (TALK
PAGE
) 16:42, 19 November 2014 (UTC)Reply

  • Thanks for stopping by and making the suggestion. I knew it needed to be updated (there is a missing \n in the TRON section too), but was too anxious last night to worry about that as long as it was functioning as expected and intended. My daughter had to go into the doctor's this morning and that had my anxiety up. Anyways, I'll likely fix that up and I'm thinking about copying the script to my sandbox for testing the ability to replace the (<# of tabs>) section and the tooltip with the % chance of it being a CV based on what the copyvios tool returns.  :) Happy editing! — {{U|Technical 13}} (etc) 21:24, 19 November 2014 (UTC)Reply

Requested edit 16 July 2018 edit

This script is no longer actively maintained due to Technical_13's indefinite ban. I have created a copy of this script at User:Ahecht/Scripts/CVD.js with bugfixes that I am maintaining. Please replace the content of this script with:

/*#REDIRECT [[User:Ahecht/Scripts/CVD.js]]*/mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Ahecht/Scripts/CVD.js&action=raw&ctype=text/javascript' );