Index: lib/filterClasses.js |
diff --git a/lib/filterClasses.js b/lib/filterClasses.js |
index ec7d3d7067494ce7d630844ed57edd194b4641f9..24c18d46761ae29e4ffa468835a1c8d9595f68fb 100644 |
--- a/lib/filterClasses.js |
+++ b/lib/filterClasses.js |
@@ -108,9 +108,9 @@ Filter.optionsRegExp = /\$(~?[\w-]+(?:=[^,\s]+)?(?:,~?[\w-]+(?:=[^,\s]+)?)*)$/; |
*/ |
Filter.fromText = function(text) |
{ |
- let ret = Filter.knownFilters.get(text); |
- if (ret) |
- return ret; |
+ let filter = Filter.knownFilters.get(text); |
+ if (filter) |
+ return filter; |
let match = (text.includes("#") ? Filter.elemhideRegExp.exec(text) : null); |
if (match) |
@@ -127,17 +127,17 @@ Filter.fromText = function(text) |
`${prefix}:-abp-properties(${expression})${suffix}`); |
} |
- ret = ElemHideBase.fromText( |
+ filter = ElemHideBase.fromText( |
text, match[1], match[2], match[3] |
); |
} |
else if (text[0] == "!") |
- ret = new CommentFilter(text); |
+ filter = new CommentFilter(text); |
else |
- ret = RegExpFilter.fromText(text); |
+ filter = RegExpFilter.fromText(text); |
- Filter.knownFilters.set(ret.text, ret); |
- return ret; |
+ Filter.knownFilters.set(filter.text, filter); |
+ return filter; |
}; |
/** |
@@ -148,17 +148,17 @@ Filter.fromText = function(text) |
*/ |
Filter.fromObject = function(obj) |
{ |
- let ret = Filter.fromText(obj.text); |
- if (ret instanceof ActiveFilter) |
+ let filter = Filter.fromText(obj.text); |
+ if (filter instanceof ActiveFilter) |
{ |
if ("disabled" in obj) |
- ret._disabled = (obj.disabled == "true"); |
+ filter._disabled = (obj.disabled == "true"); |
if ("hitCount" in obj) |
- ret._hitCount = parseInt(obj.hitCount, 10) || 0; |
+ filter._hitCount = parseInt(obj.hitCount, 10) || 0; |
if ("lastHit" in obj) |
- ret._lastHit = parseInt(obj.lastHit, 10) || 0; |
+ filter._lastHit = parseInt(obj.lastHit, 10) || 0; |
} |
- return ret; |
+ return filter; |
}; |
/** |