mirror of https://github.com/gorhill/uBlock.git
Improve `google-ima.js` surrogate
Related issues: - https://github.com/uBlockOrigin/uBlock-issues/issues/2265 - https://github.com/uBlockOrigin/uAssets/issues/19981
This commit is contained in:
parent
d4918c1d0a
commit
02c7b32bef
|
@ -7,6 +7,8 @@
|
||||||
* - Avoid JS syntax not supported by older browser versions
|
* - Avoid JS syntax not supported by older browser versions
|
||||||
* - Add missing shim event
|
* - Add missing shim event
|
||||||
* - Modified to avoid jshint warnings as per uBO's config
|
* - Modified to avoid jshint warnings as per uBO's config
|
||||||
|
* - Added `OmidVerificationVendor` to `ima`
|
||||||
|
* - Have `AdError.getInnerError()` return `null`
|
||||||
*
|
*
|
||||||
* Related issue:
|
* Related issue:
|
||||||
* - https://github.com/uBlockOrigin/uBlock-issues/issues/2158
|
* - https://github.com/uBlockOrigin/uBlock-issues/issues/2158
|
||||||
|
@ -228,7 +230,7 @@ if (!window.google || !window.google.ima || !window.google.ima.VERSION) {
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
let ima = {};
|
const ima = {};
|
||||||
|
|
||||||
class AdDisplayContainer {
|
class AdDisplayContainer {
|
||||||
destroy() {}
|
destroy() {}
|
||||||
|
@ -613,7 +615,9 @@ if (!window.google || !window.google.ima || !window.google.ima.VERSION) {
|
||||||
getErrorCode() {
|
getErrorCode() {
|
||||||
return this.errorCode;
|
return this.errorCode;
|
||||||
}
|
}
|
||||||
getInnerError() {}
|
getInnerError() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
getMessage() {
|
getMessage() {
|
||||||
return this.message;
|
return this.message;
|
||||||
}
|
}
|
||||||
|
@ -789,6 +793,12 @@ if (!window.google || !window.google.ima || !window.google.ima.VERSION) {
|
||||||
FULL: "full",
|
FULL: "full",
|
||||||
LIMITED: "limited",
|
LIMITED: "limited",
|
||||||
},
|
},
|
||||||
|
OmidVerificationVendor: new Proxy({}, {
|
||||||
|
get(target, prop) {
|
||||||
|
if ( typeof prop === 'number' ) { return ''; }
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}),
|
||||||
settings: new ImaSdkSettings(),
|
settings: new ImaSdkSettings(),
|
||||||
UiElements: {
|
UiElements: {
|
||||||
AD_ATTRIBUTION: "adAttribution",
|
AD_ATTRIBUTION: "adAttribution",
|
||||||
|
|
Loading…
Reference in New Issue