From 05f4404c32f7f7e66d6235d76b4c69f303f0c76d Mon Sep 17 00:00:00 2001 From: NovemLinguae Date: Wed, 10 Apr 2024 00:57:13 -0700 Subject: [PATCH] fix #324 Displaying "This submission may contain copyright violations" is broken Was comparing string to int. One fix is to change `===` to `==` --- src/modules/submissions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/submissions.js b/src/modules/submissions.js index c2136088..4f20c835 100644 --- a/src/modules/submissions.js +++ b/src/modules/submissions.js @@ -1157,7 +1157,7 @@ page_id: mw.config.get( 'wgArticleId' ) } ).then( function ( json ) { var triageInfo = json.pagetriagelist.pages[ 0 ]; - if ( triageInfo && triageInfo.copyvio === mw.config.get( 'wgCurRevisionId' ) ) { + if ( triageInfo && triageInfo.copyvio == mw.config.get( 'wgCurRevisionId' ) ) { addWarning( 'This submission may contain copyright violations', 'CopyPatrol', function () { window.open( 'https://copypatrol.wmcloud.org/en?filter=all&searchCriteria=page_exact&searchText=' + encodeURIComponent( afchPage.rawTitle ) + '&drafts=1&revision=' +