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

Unified Diff: new-options.js

Issue 29340970: Noissue - Several trivial code improvements (adblockplusui) (Closed)
Patch Set: Created April 29, 2016, 12:44 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: new-options.js
diff --git a/new-options.js b/new-options.js
index 3b8f6eb94f5b5c317a27a26cac9f4cc038a37ada..9140a459ec877781f06af4caf30867bc5228c516 100644
--- a/new-options.js
+++ b/new-options.js
@@ -52,7 +52,7 @@
}
else if (placeholder)
table.removeChild(placeholder);
- }
+ };
Collection.prototype._createElementQuery = function(item)
{
@@ -72,7 +72,7 @@
return item.title || item.url || item.text;
};
- Collection.prototype.addItems = function()
+ Collection.prototype.addItems = function()
{
var length = Array.prototype.push.apply(this.items, arguments);
if (length == 0)
@@ -94,11 +94,11 @@
return aTitle.localeCompare(bTitle);
}.bind(this));
- for (var j = 0; j < this.details.length; j++)
+ for (var j = 0; j < this.details.length; j++)
{
var table = E(this.details[j].id);
var template = table.querySelector("template");
- for (var i = 0; i < arguments.length; i++)
+ for (var i = 0; i < arguments.length; i++)
{
var item = arguments[i];
var listItem = document.createElement("li");
@@ -127,7 +127,7 @@
this._setEmpty(table, null);
if (table.hasChildNodes())
{
- table.insertBefore(listItem,
+ table.insertBefore(listItem,
table.childNodes[this.items.indexOf(item)]);
}
else
@@ -858,7 +858,7 @@
{
type: "filters.get",
subscriptionUrl: subscriptions[i].url
- },
+ },
function(filters)
{
for (var i = 0; i < filters.length; i++)
@@ -885,7 +885,7 @@
{
type: "subscriptions.get",
downloadable: true
- },
+ },
function(subscriptions)
{
for (var i = 0; i < subscriptions.length; i++)
@@ -924,9 +924,9 @@
var messageType = null;
var knownSubscription = subscriptionsMap[url];
if (knownSubscription && knownSubscription.disabled == true)
- messageType = "subscriptions.toggle"
+ messageType = "subscriptions.toggle";
else
- messageType = "subscriptions.add"
+ messageType = "subscriptions.add";
var message = {
type: messageType,
@@ -1070,10 +1070,7 @@
{
e.preventDefault();
- getDocLink("share-general", function(link)
- {
- openSharePopup(link);
- });
+ getDocLink("share-general", openSharePopup);
}
function updateShareLink()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld