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

Unified Diff: include.preload.js

Issue 29555932: Issue 5781 - Merge messages for regular and emulated element hiding filters (Closed)
Patch Set: Created Sept. 25, 2017, 11:07 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 | lib/cssInjection.js » ('j') | lib/cssInjection.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include.preload.js
===================================================================
--- a/include.preload.js
+++ b/include.preload.js
@@ -346,15 +346,10 @@
this.tracer = null;
this.inject = true;
+ this.elemHideEmulationPatterns = null;
this.elemHideEmulation = new ElemHideEmulation(
window,
- callback =>
- {
- ext.backgroundPage.sendMessage({
- type: "filters.get",
- what: "elemhideemulation"
- }, callback);
- },
+ callback => { callback(this.elemHideEmulationPatterns); },
Sebastian Noack 2017/09/25 23:13:19 In the next step we should pass patterns just as a
Manish Jethani 2017/09/26 11:50:18 This might read better as another method of ElemHi
Sebastian Noack 2017/09/26 21:50:40 Since you don't have a strong opinion, I think I p
this.addSelectors.bind(this),
this.hideElements.bind(this)
);
@@ -506,6 +501,7 @@
else if (this.tracer)
this.tracer.addSelectors(response.selectors);
+ this.elemHideEmulationPatterns = response.emulated;
this.elemHideEmulation.apply();
});
}
« no previous file with comments | « no previous file | lib/cssInjection.js » ('j') | lib/cssInjection.js » ('J')

Powered by Google App Engine
This is Rietveld