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

Unified Diff: lib/content/snippets.js

Issue 29828604: Issue 6790 - Implement uabinject-defuser snippet (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Rebase on patch #29829569 Created July 13, 2018, 2:34 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/content/snippets.js
===================================================================
--- a/lib/content/snippets.js
+++ b/lib/content/snippets.js
@@ -67,8 +67,21 @@
exports.log = log;
function trace(...args)
{
log(...args);
}
exports.trace = makeInjector(trace, log);
+
+// This is an implementation of the uabinject-defuser technique used by uBlock
+// Origin
+// https://github.com/uBlockOrigin/uAssets/blob/c091f861b63cd2254b8e9e4628f6bdcd89d43caa/filters/resources.txt#L640
+function uabinjectDefuser()
+{
+ window.trckd = true;
+ window.uabpdl = true;
+ window.uabInject = true;
+ window.uabDetect = true;
+}
+
+exports["uabinject-defuser"] = makeInjector(uabinjectDefuser);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld