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

Unified Diff: lib/content/elemHideEmulation.js

Issue 29460576: Issue 5079 - Turn elemHideEmulation into a CommonJS module (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Updated patch. Fails for now Created Aug. 10, 2017, 2:42 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 | « lib/common.js ('k') | test/browser/elemHideEmulation.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/content/elemHideEmulation.js
===================================================================
rename from chrome/content/elemHideEmulation.js
rename to lib/content/elemHideEmulation.js
--- a/chrome/content/elemHideEmulation.js
+++ b/lib/content/elemHideEmulation.js
@@ -10,19 +10,19 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
-/* globals filterToRegExp */
+"use strict";
-"use strict";
+const {filterToRegExp} = require("common");
const MIN_INVOCATION_INTERVAL = 3000;
const abpSelectorRegexp = /:-abp-([\w-]+)\(/i;
function splitSelector(selector)
{
if (selector.indexOf(",") == -1)
return [selector];
@@ -519,8 +519,11 @@
{
let {document} = this.window;
this.addSelectors();
document.addEventListener("load", this.onLoad.bind(this), true);
}
});
}
};
+
+exports.ElemHideEmulation = ElemHideEmulation;
+exports.splitSelector = splitSelector;
« no previous file with comments | « lib/common.js ('k') | test/browser/elemHideEmulation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld