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: Rebased on master Created Aug. 10, 2017, 2: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 | « 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];
@@ -507,8 +507,11 @@
{
let {document} = this.window;
this.addSelectors();
document.addEventListener("load", this.onLoad.bind(this), true);
}
});
}
};
+
+exports.ElemHideEmulation = ElemHideEmulation;
+exports.splitSelector = splitSelector;
Wladimir Palant 2017/08/16 09:55:53 This shouldn't export splitSelector. If we need th
kzar 2017/08/16 09:59:05 Acknowledged, OK I'll move that over while I'm at
« 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