a few weeks ago videos on a local news website in Belgium stopped working without 2mdn.net allowed. See this example: http://goo.gl/g77eho. It complained about google.ima.settings being undefined. So I added a __noSuchMethod__ function to catch calls to google.ima.settings. I am not exactly sure if this is the best way to extend the script surrogate but I can confirm it works like this.
The updated script surrogate for 2mdn.net I use is:
Code: Select all
if('Proxy' in window){let _f=function(){};google={};Object.defineProperty(google,'__noSuchMethod__',{configurable:true,enumerable:false,value:_f});let ima={};ima.AdsManagerLoadedEvent=ima.AdErrorEvent={Type:new Proxy({},{get:function(){return 0}}),};ima.AdsLoader=ima.AdsRequest=ima.AdDisplayContainer=function(){return new Proxy({},{get:function(){return _f}});};ima.settings={__noSuchMethod__:function(){}};google.ima=ima;}