Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: composer.js

Issue 29371763: Issue 4795 - Use modern JavaScript syntax (Closed)
Patch Set: Addressed some more feedback Created Jan. 18, 2017, 11:44 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/ext/popup.js ('k') | composer.postload.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: composer.js
diff --git a/composer.js b/composer.js
index fc8e9ccaf6e0e13baeb2b5f166bf7b4f45625405..6c54eff99dd0775af4f9262f61defc7be4dd1ad7 100644
--- a/composer.js
+++ b/composer.js
@@ -15,7 +15,9 @@
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
-var targetPageId = null;
+"use strict";
+
+let targetPageId = null;
function onKeyDown(event)
{
@@ -38,7 +40,7 @@ function addFilters()
type: "filters.importRaw",
text: document.getElementById("filters").value
},
- function(errors)
+ errors =>
{
if (errors.length > 0)
alert(errors.join("\n"));
@@ -77,7 +79,7 @@ function init()
document.getElementById("filters").focus();
- ext.onMessage.addListener(function(msg, sender, sendResponse)
+ ext.onMessage.addListener((msg, sender, sendResponse) =>
{
switch (msg.type)
{
« no previous file with comments | « chrome/ext/popup.js ('k') | composer.postload.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld