User talk:NguoiDungKhongDinhDanh/CopyvioChecker.js

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Interface-protected edit request on 25 September 2021[edit]

Hi NguoiDungKhongDinhDanh, CopyvioChecker is a nice script! I would like to propose a small change: From lang: mw.config.get( 'wgPageContentLanguage' ), project: mw.config.get( 'wgSitename' ), title: mw.config.get( 'wgPageName' ), to lang: mw.config.get( 'wgServer' ).replace(/\//g, '').split('.')[0], project: mw.config.get( 'wgServer' ).replace(/\//g, '').split('.')[1], oldid: mw.config.get( 'wgRevisionId' ), By changing the lang and project parameter it will supply Earwig's Copyvio Detector with all necessary info and will jump right into the search, without having to press submit. Using the oldid parameter instead of the title one improves usage when going through old revisions or diffs of an article.– NJD-DE (talk) 14:42, 25 September 2021 (UTC)[reply]

@Njd-de: plus Added (diff), thank you for recommending. UnnamedUser 15:22, 25 September 2021 (UTC)[reply]
Hi NguoiDungKhongDinhDanh. I have another idea to improve the script: Currently when trying to use CopyvioChecker on an article history it doesn't work because mw.config.get( 'wgRevisionId' ) returns revision id 0.
If we change oldid: mw.config.get( 'wgRevisionId' ), to
oldid: (mw.config.get( 'wgRevisionId' )===0) ? (mw.config.get( 'wgCurRevisionId' )) : (mw.config.get( 'wgRevisionId' )), then we can still get the specific revision when viewing a diff, or old version of the article. And when coming from the article history it will use copyviodetector on the current revision. What do you think? – NJD-DE (talk) 08:48, 2 October 2021 (UTC)[reply]
 Done UnnamedUser 09:37, 2 October 2021 (UTC)[reply]
Awesome! Thanks! – NJD-DE (talk) 09:39, 2 October 2021 (UTC)[reply]