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

Unified Diff: libadblockplus-android-webview/assets/inject.js

Issue 29678581: Issue 6000 - Rename "libadblockplus-android" (Closed)
Patch Set: addressed comments Created Jan. 29, 2018, 11:04 a.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 | « libadblockplus-android-webview/assets/hide.js ('k') | libadblockplus-android-webview/build.gradle » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libadblockplus-android-webview/assets/inject.js
diff --git a/libadblockplus-android-webview/assets/inject.js b/libadblockplus-android-webview/assets/inject.js
deleted file mode 100644
index d6c4599f47e9bf5994a4be1ebd312916a49665c0..0000000000000000000000000000000000000000
--- a/libadblockplus-android-webview/assets/inject.js
+++ /dev/null
@@ -1,44 +0,0 @@
-var hideElements = function()
-{
- // no need to invoke if already invoked on another event
- if ({{BRIDGE}}.isElementsHidden())
- {
- {{DEBUG}} console.log('already hidden, exiting');
- return;
- }
-
- // hide using element visibility (to be replaced with script body)
- {{HIDE}}
-
- {{BRIDGE}}.setElementsHidden(true); // set flag not to do it again
-};
-
-if ({{BRIDGE}}.getAddDomListener() && document.readyState != 'complete')
-{
- {{BRIDGE}}.setAddDomListener(false);
-
- // onreadystatechange event
- document.onreadystatechange = function()
- {
- {{DEBUG}} console.log('onreadystatechange() event fired (' + document.readyState + ')')
- if (document.readyState == 'interactive')
- {
- hideElements();
- }
- }
-
- // load event
- window.addEventListener('load', function(event)
- {
- {{DEBUG}} console.log('load() event fired');
- hideElements();
- });
-
- // DOMContentLoaded event
- document.addEventListener('DOMContentLoaded', function()
- {
- {{DEBUG}} console.log('DOMContentLoaded() event fired');
- hideElements();
- }, false);
-
-};
« no previous file with comments | « libadblockplus-android-webview/assets/hide.js ('k') | libadblockplus-android-webview/build.gradle » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld