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: Created June 9, 2017, 5:08 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 | 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,16 +10,17 @@
* 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/>.
*/
+/* eslint-env browser */
kzar 2017/06/12 12:50:13 Why is this necessary?
hub 2017/06/12 13:26:33 The mistake here is that I should have the proper
kzar 2017/06/12 13:35:12 Sorry, but I still don't understand why it's neces
hub 2017/06/12 14:03:14 This change is gone in the current version of the
kzar 2017/06/12 14:12:44 Right now I understand, previously this file was i
hub 2017/06/12 15:21:50 This is now totally gone in the current patch sinc
/* globals filterToRegExp */
"use strict";
const abpSelectorRegexp = /:-abp-([\w-]+)\(/i;
function splitSelector(selector)
{
@@ -447,8 +448,14 @@
{
let {document} = this.window;
this.addSelectors(document.styleSheets);
document.addEventListener("load", this.onLoad.bind(this), true);
}
});
}
};
+
+if (typeof exports != "undefined")
kzar 2017/06/12 12:50:13 Don't we expect exports to always exist like for t
hub 2017/06/12 13:26:34 Sadly no, we can't expect that yet. -in the tests
kzar 2017/06/12 13:35:12 Ah right, well I think we need to fix that at the
hub 2017/06/12 14:03:13 agreed.
kzar 2017/07/07 13:42:20 After reading through this review again I think re
hub 2017/08/10 14:46:21 Acknowledged.
+{
+ exports.ElemHideEmulation = ElemHideEmulation;
+ exports.splitSelector = splitSelector;
+}
« no previous file with comments | « no previous file | test/browser/elemHideEmulation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld