Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/268955
Change subject: JavaScript: Use single quotes instead of double quotes for strings ...................................................................... JavaScript: Use single quotes instead of double quotes for strings * Exceptions: "''" and "'''" * This avoids escaping of double quotes. * https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript#Quotes Change-Id: Ibd32a63c4c97a7ef8938c6d2dff83b952cfca43e --- M modules/jquery.wikiEditor.dialogs.config.js M modules/jquery.wikiEditor.toolbar.config.js 2 files changed, 39 insertions(+), 39 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiEditor refs/changes/55/268955/1 diff --git a/modules/jquery.wikiEditor.dialogs.config.js b/modules/jquery.wikiEditor.dialogs.config.js index 406c674..0f27785 100644 --- a/modules/jquery.wikiEditor.dialogs.config.js +++ b/modules/jquery.wikiEditor.dialogs.config.js @@ -109,7 +109,7 @@ if ( typeof arguments.callee.regex === 'undefined' ) { // Cache the regex arguments.callee.regex = - new RegExp( "^(" + mw.config.get( 'wgUrlProtocols' ) + "|www\\.)", 'i' ); + new RegExp( '^(' + mw.config.get( 'wgUrlProtocols' ) + '|www\\.)', 'i' ); } return s.match( arguments.callee.regex ); } @@ -421,10 +421,10 @@ text = $( '#wikieditor-toolbar-link-int-text' ).val(); // check if the tooltips were passed as target or text if ( $( '#wikieditor-toolbar-link-int-target' ).data( 'tooltip-mode' ) ) { - target = ""; + target = ''; } if ( $( '#wikieditor-toolbar-link-int-text' ).data( 'tooltip-mode' ) ) { - text = ""; + text = ''; } if ( target === '' ) { alert( mw.msg( 'wikieditor-toolbar-tool-link-empty' ) ); @@ -918,9 +918,9 @@ } var headerText = mw.msg( 'wikieditor-toolbar-tool-table-example-header' ); var normalText = mw.msg( 'wikieditor-toolbar-tool-table-example' ); - var table = ""; + var table = ''; for ( var r = 0; r < rows + header; r++ ) { - table += "|-\n"; + table += '|-\n'; for ( var c = 0; c < cols; c++ ) { var isHeader = ( header && r === 0 ); var delim = isHeader ? '!' : '|'; @@ -931,7 +931,7 @@ } // Replace trailing space by newline // table[table.length - 1] is read-only - table = table.substr( 0, table.length - 1 ) + "\n"; + table = table.substr( 0, table.length - 1 ) + '\n'; } var classes = []; if ( $( '#wikieditor-toolbar-table-wikitable' ).is( ':checked' ) ) { @@ -947,7 +947,7 @@ { type: 'replace', options: { - pre: '{|' + classStr + "\n", + pre: '{|' + classStr + '\n', peri: table, post: '|}', ownline: true diff --git a/modules/jquery.wikiEditor.toolbar.config.js b/modules/jquery.wikiEditor.toolbar.config.js index 35eddc0..9e23580 100644 --- a/modules/jquery.wikiEditor.toolbar.config.js +++ b/modules/jquery.wikiEditor.toolbar.config.js @@ -138,9 +138,9 @@ action: { type: 'encapsulate', options: { - pre: "[", + pre: '[', periMsg: 'wikieditor-toolbar-tool-xlink-example', - post: "]" + post: ']' } } }, @@ -152,9 +152,9 @@ action: { type: 'encapsulate', options: { - pre: "[[", + pre: '[[', periMsg: 'wikieditor-toolbar-tool-ilink-example', - post: "]]" + post: ']]' } } }, @@ -168,7 +168,7 @@ options: { pre: '[[' + fileNamespace + ':', periMsg: 'wikieditor-toolbar-tool-file-example', - post: "|" + mw.config.get( 'wgWikiEditorMagicWords' ).img_thumbnail + "]]" + post: '|' + mw.config.get( 'wgWikiEditorMagicWords' ).img_thumbnail + ']]' } } }, @@ -181,9 +181,9 @@ action: { type: 'encapsulate', options: { - pre: "<ref>", + pre: '<ref>', periMsg: 'wikieditor-toolbar-tool-reference-example', - post: "</ref>" + post: '</ref>' } } }, @@ -195,7 +195,7 @@ action: { type: 'encapsulate', options: { - pre: "--~~~~" + pre: '--~~~~' } } } @@ -223,7 +223,7 @@ periMsg: 'wikieditor-toolbar-tool-heading-example', post: ' ==', regex: /^(\s*)(={1,6})(.*?)\2(\s*)$/, - regexReplace: "$1==$3==$4", + regexReplace: '$1==$3==$4', ownline: true } } @@ -237,7 +237,7 @@ periMsg: 'wikieditor-toolbar-tool-heading-example', post: ' ===', regex: /^(\s*)(={1,6})(.*?)\2(\s*)$/, - regexReplace: "$1===$3===$4", + regexReplace: '$1===$3===$4', ownline: true } } @@ -251,7 +251,7 @@ periMsg: 'wikieditor-toolbar-tool-heading-example', post: ' ====', regex: /^(\s*)(={1,6})(.*?)\2(\s*)$/, - regexReplace: "$1====$3====$4", + regexReplace: '$1====$3====$4', ownline: true } } @@ -265,7 +265,7 @@ periMsg: 'wikieditor-toolbar-tool-heading-example', post: ' =====', regex: /^(\s*)(={1,6})(.*?)\2(\s*)$/, - regexReplace: "$1=====$3=====$4", + regexReplace: '$1=====$3=====$4', ownline: true } } @@ -291,9 +291,9 @@ action: { type: 'encapsulate', options: { - pre: "* ", + pre: '* ', periMsg: 'wikieditor-toolbar-tool-ulist-example', - post: "", + post: '', ownline: true, splitlines: true } @@ -313,9 +313,9 @@ action: { type: 'encapsulate', options: { - pre: "# ", + pre: '# ', periMsg: 'wikieditor-toolbar-tool-olist-example', - post: "", + post: '', ownline: true, splitlines: true } @@ -329,9 +329,9 @@ action: { type: 'encapsulate', options: { - pre: "<nowiki>", + pre: '<nowiki>', periMsg: 'wikieditor-toolbar-tool-nowiki-example', - post: "</nowiki>" + post: '</nowiki>' } } }, @@ -343,7 +343,7 @@ action: { type: 'encapsulate', options: { - pre: "<br />\n" + pre: '<br />\n' } } } @@ -359,9 +359,9 @@ action: { type: 'encapsulate', options: { - pre: "<big>", + pre: '<big>', periMsg: 'wikieditor-toolbar-tool-big-example', - post: "</big>" + post: '</big>' } } }, @@ -373,9 +373,9 @@ action: { type: 'encapsulate', options: { - pre: "<small>", + pre: '<small>', periMsg: 'wikieditor-toolbar-tool-small-example', - post: "</small>" + post: '</small>' } } }, @@ -387,9 +387,9 @@ action: { type: 'encapsulate', options: { - pre: "<sup>", + pre: '<sup>', periMsg: 'wikieditor-toolbar-tool-superscript-example', - post: "</sup>" + post: '</sup>' } } }, @@ -401,9 +401,9 @@ action: { type: 'encapsulate', options: { - pre: "<sub>", + pre: '<sub>', periMsg: 'wikieditor-toolbar-tool-subscript-example', - post: "</sub>" + post: '</sub>' } } } @@ -420,12 +420,12 @@ action: { type: 'encapsulate', options: { - pre: "<gallery>\n", + pre: '<gallery>\n', periMsg: [ 'wikieditor-toolbar-tool-gallery-example', fileNamespace ], - post: "\n</gallery>", + post: '\n</gallery>', ownline: true } } @@ -439,9 +439,9 @@ action: { type: 'encapsulate', options: { - pre: "{| class=\"wikitable\" border=\"1\"\n|", + pre: '{| class="wikitable" border="1"\n|', periMsg: 'wikieditor-toolbar-tool-table-example-old', - post: "\n|}", + post: '\n|}', ownline: true } } @@ -462,7 +462,7 @@ options: { pre: mw.config.get( 'wgWikiEditorMagicWords' ).redirect + ' [[', periMsg: 'wikieditor-toolbar-tool-redirect-example', - post: "]]", + post: ']]', ownline: true } } -- To view, visit https://gerrit.wikimedia.org/r/268955 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd32a63c4c97a7ef8938c6d2dff83b952cfca43e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiEditor Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
