From f0e559e5afac005e44dd0e272c9182037e50ca7f Mon Sep 17 00:00:00 2001 From: gullyn Date: Tue, 1 Mar 2022 16:20:07 -0500 Subject: [PATCH] show copyvio url when not selecting speedy deletion --- src/modules/submissions.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/modules/submissions.js b/src/modules/submissions.js index 52440da..4996a4f 100644 --- a/src/modules/submissions.js +++ b/src/modules/submissions.js @@ -2432,19 +2432,21 @@ } // Copyright violations get {{db-g12}}'d as well - if ( ( declineReason === 'cv' || declineReason2 === 'cv' ) && data.csdSubmission ) { + if ( declineReason === 'cv' || declineReason2 === 'cv' ) { var cvUrls = data.cvUrlTextarea.split( '\n' ).slice( 0, 3 ), urlParam = ''; - // Build url param for db-g12 template - urlParam = cvUrls[ 0 ]; - if ( cvUrls.length > 1 ) { - urlParam += '|url2=' + cvUrls[ 1 ]; - if ( cvUrls.length > 2 ) { - urlParam += '|url3=' + cvUrls[ 2 ]; + if ( data.csdSubmission ) { + // Build url param for db-g12 template + urlParam = cvUrls[ 0 ]; + if ( cvUrls.length > 1 ) { + urlParam += '|url2=' + cvUrls[ 1 ]; + if ( cvUrls.length > 2 ) { + urlParam += '|url3=' + cvUrls[ 2 ]; + } } + text.prepend( '{{db-g12|url=' + urlParam + ( afchPage.additionalData.revId ? '|oldid=' + afchPage.additionalData.revId : '' ) + '}}\n' ); } - text.prepend( '{{db-g12|url=' + urlParam + ( afchPage.additionalData.revId ? '|oldid=' + afchPage.additionalData.revId : '' ) + '}}\n' ); // Include the URLs in the decline template if ( declineReason === 'cv' ) {