' )
.addClass( 'malformed-refs' )
.appendTo( $warningDiv );
@@ -1135,7 +1147,7 @@
// Simulate cleanUp first so that we don't warn about HTML
// comments that the script will remove anyway in the future
text = ( new AFCH.Text( rawText ) ).cleanUp( true ),
- longCommentRegex = /(?:)?/g,
+ longCommentRegex = /(?:)?/g,
longCommentMatches = text.match( longCommentRegex ) || [],
numberOfComments = longCommentMatches.length,
oneComment = numberOfComments === 1;
@@ -1227,7 +1239,7 @@
// $1 = article name
// $2 = article class or '' if not available
'accepted-submission': headerBegin +
- '[[$1]] has been accepted ==\n{{subst:Afc talk|$1|class=$2|sig=~~' + '~~}}',
+ '[[$1]] has been accepted ==\n{{subst:Afc talk|$1|class=$2|sig=~~~~}}',
// $1 = full submission title
// $2 = short title
@@ -1254,9 +1266,9 @@
'comment-on-submission': '{{subst:AFC notification|comment|article=$1}}',
// $1 = article name
- 'g13-submission': '{{subst:Db-afc-notice|$1}} ~~' + '~~',
+ 'g13-submission': '{{subst:Db-afc-notice|$1}} ~~~~',
- 'teahouse-invite': '{{subst:Wikipedia:Teahouse/AFC invitation|sign=~~' + '~~}}'
+ 'teahouse-invite': '{{subst:Wikipedia:Teahouse/AFC invitation|sign=~~~~}}'
} );
}
@@ -1387,7 +1399,6 @@
* calls the passed function
*
* @param {Function} fn function to call when spinner has been displayed
- * @return {[type]} [description]
*/
function spinnerAndRun( fn ) {
var $spinner, $container = $afch.find( '#afchContent' );
@@ -1513,7 +1524,9 @@
// If any templates weren't in the WikiProject map, check if they were redirects
if ( otherTemplates.length > 0 ) {
- var titles = otherTemplates.map( function ( n ) { return 'Template:' + n; } );
+ var titles = otherTemplates.map( function ( n ) {
+ return 'Template:' + n;
+ } );
titles = titles.slice( 0, 50 ); // prevent API error by capping max # of titles at 50
titles = titles.join( '|' );
return AFCH.api.post( {
@@ -1569,7 +1582,9 @@
if ( !hasWikiProjects ) {
mw.notify( 'Could not load WikiProject list!' );
}
- var wikiProjectObjs = Object.keys( wikiProjectMap ).map( function ( key ) { return wikiProjectMap[ key ]; } );
+ var wikiProjectObjs = Object.keys( wikiProjectMap ).map( function ( key ) {
+ return wikiProjectMap[ key ];
+ } );
loadView( 'accept', {
newTitle: afchSubmission.shortTitle,
@@ -1906,7 +1921,9 @@
declineCounts = AFCH.userData.get( 'decline-counts', false );
if ( declineCounts ) {
- declineList = $.map( declineCounts, function ( _, key ) { return key; } );
+ var declineList = $.map( declineCounts, function ( _, key ) {
+ return key;
+ } );
// Sort list in descending order (most-used at beginning)
declineList.sort( function ( a, b ) {
@@ -2105,8 +2122,8 @@
function addSignature( text ) {
text = text.trim();
- if ( text.indexOf( '~~' + '~~' ) === -1 ) {
- text += ' ~~' + '~~';
+ if ( text.indexOf( '~~~~' ) === -1 ) {
+ text += ' ~~~~';
}
return text;
}
@@ -2868,7 +2885,7 @@
text = data.afchText,
rawText = text.get(),
postponeRegex = /\{\{AfC postpone G13\s*(?:\|\s*(\d*)\s*)?\}\}/ig;
- match = postponeRegex.exec( rawText );
+ var match = postponeRegex.exec( rawText );
// First add the postpone template
if ( match ) {
@@ -2899,4 +2916,4 @@
}
}( AFCH, jQuery, mediaWiki ) );
-//
+//
diff --git a/src/templates/tpl-preferences.html b/src/templates/tpl-preferences.html
index 346f2151..4e468eb6 100644
--- a/src/templates/tpl-preferences.html
+++ b/src/templates/tpl-preferences.html
@@ -1,4 +1,4 @@
-//
+//
@@ -37,4 +37,4 @@
-//
+//
diff --git a/src/templates/tpl-submissions.html b/src/templates/tpl-submissions.html
index 0f24ad56..145d5051 100644
--- a/src/templates/tpl-submissions.html
+++ b/src/templates/tpl-submissions.html
@@ -1,4 +1,4 @@
-//
+//
@@ -382,4 +382,4 @@
-//
+//