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

Unified Diff: lib/filterComposer.js

Issue 29371763: Issue 4795 - Use modern JavaScript syntax (Closed)
Patch Set: Undo accidental whitespace change Created Jan. 16, 2017, 2:57 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: lib/filterComposer.js
diff --git a/lib/filterComposer.js b/lib/filterComposer.js
index 10390f9f3be7462ec52da3639872fa1df757b2a8..cd33a58b804e9a5360623721f8e37fd3f01fa206 100644
--- a/lib/filterComposer.js
+++ b/lib/filterComposer.js
@@ -35,7 +35,7 @@ let readyPages = new ext.PageMap();
* @param {Page} page
* @return {boolean}
*/
-exports.isPageReady = function(page)
+exports.isPageReady = page =>
{
return readyPages.has(page);
};
@@ -66,7 +66,7 @@ let escapeCSS =
* @return {string}
* @static
*/
-exports.escapeCSS = function(s)
+exports.escapeCSS = s =>
{
return s.replace(/^[\d\-]|[^\w\-\u0080-\uFFFF]/g, escapeChar);
};
@@ -79,7 +79,7 @@ let quoteCSS =
* @return {string}
* @static
*/
-exports.quoteCSS = function(value)
+exports.quoteCSS = value =>
{
return '"' + value.replace(/["\\\{\}\x00-\x1F\x7F]/g, escapeChar) + '"';
};
@@ -156,7 +156,7 @@ function composeFilters(details)
let contextMenuItem = {
title: ext.i18n.getMessage("block_element"),
contexts: ["image", "video", "audio"],
- onclick: page =>
+ onclick(page)
{
page.sendMessage({type: "composer.content.contextMenuClicked"});
}

Powered by Google App Engine
This is Rietveld