Skip to content
Permalink
Browse files
Fix 'adsbygoogle' neutered script
As per internal feedback.

The `length` property exists if the `adsbygoogle` object
is instantiated before the `adsbygoogle.js` script has
been loaded, but is no longer present once the
`adsbygoogle.js` script has been loaded.

Related commit:
- gorhill/uBlock@eb6be3a

Co-authored-by: Raymond Hill <rhill@raymondhill.net>
  • Loading branch information
JustOff and gorhill committed Feb 26, 2021
1 parent 5ed698e commit d26f3acbfec459d6ad002c7a21dfcf7e28877913
Showing with 2 additions and 9 deletions.
  1. +2 −9 assets/resources/resources.txt
@@ -588,16 +588,9 @@ googletagmanager.com/gtm.js application/javascript
# https://github.com/uBlockOrigin/uAssets/issues/418
googlesyndication.com/adsbygoogle.js application/javascript
(function() {
window.adsbygoogle = window.adsbygoogle || {
length: 0,
window.adsbygoogle = {
loaded: true,
push: function Si() {
/*
client = client || google_ad_client || google_ad_client;
slotname = slotname || google_ad_slot;
tag_origin = tag_origin || google_tag_origin
*/
this.length += 1;
push: function () {
}
};
const phs = document.querySelectorAll('.adsbygoogle');

0 comments on commit d26f3ac

Please sign in to comment.