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: Created Jan. 13, 2017, 12:11 p.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
Index: composer.js
diff --git a/composer.js b/composer.js
index fc8e9ccaf6e0e13baeb2b5f166bf7b4f45625405..deb89a2a89ea7a760d27599e793d3d7f7db53326 100644
--- a/composer.js
+++ b/composer.js
@@ -15,7 +15,7 @@
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
-var targetPageId = null;
+let targetPageId = null;
function onKeyDown(event)
{
@@ -38,7 +38,7 @@ function addFilters()
type: "filters.importRaw",
text: document.getElementById("filters").value
},
- function(errors)
+ errors =>
{
if (errors.length > 0)
alert(errors.join("\n"));
@@ -77,7 +77,7 @@ function init()
document.getElementById("filters").focus();
- ext.onMessage.addListener(function(msg, sender, sendResponse)
+ ext.onMessage.addListener((msg, sender, sendResponse) =>
{
switch (msg.type)
{
« chrome/ext/common.js ('K') | « chrome/ext/popup.js ('k') | composer.postload.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld