Giter VIP home page Giter VIP logo

errorannex's People

Contributors

sean-roberts avatar

Watchers

 avatar  avatar  avatar

errorannex's Issues

Autoupdate data presented in popup

As errors happen, update the ui popup with the new data.

We're already listening for error events on the background script. Pass that data along to the pop up so it can update.

Script Injection and HTML injection

While on pandora.com, there seemed to be a js error and the name of the error included html entities that were able to be injected into our DOM and thus executed in the extension context -- this is very bad.

Below is the screenshot and dump of the error data

https://www.dropbox.com/s/476ybjj0js56mme/Screenshot%202015-08-06%2011.38.25.png?dl=0

"{"errors":[{"tabId":876,"type":"JS_ERROR","data":{"error":"Uncaught SecurityError: Blocked a frame with origin "http://tpc.googlesyndication.com" from accessing a cross-origin frame.","url":"","line":64,"column":338,"stack":"Error: Blocked a frame with origin "http://tpc.googlesyndication.com" from accessing a cross-origin frame.\n at Error (native)\n at :64:338\n at :69:46\n at b (http://c.betrad.com/surly.js?;ad_w=300;ad_h=250;coid=334;nid=18029:1:319)","name":"SecurityError","fromIframe":true,"iframeName":"1-0-2;26699;<!doctype html><body leftMargin="0" topMargin="0" marginwidth="0" marginheight="0"><script>(function(){var g=this,l=function(a,b){var c=a.split("."),d=g;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b},m=function(a,b,c){return a.call.apply(a.bind,arguments)},n=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}},p=function(a,b,c){p=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?m:n;return p.apply(null,arguments)},q=Date.now||function(){return+new Date};var r=document,s=window;var t=function(a,b){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.call(null,a[c],c,a)},w=function(a,b){a.google_image_requests||(a.google_image_requests=[]);var c=a.document.createElement("img");c.src=b;a.google_image_requests.push(c)};var x=function(a){return{visible:1,hidden:2,prerender:3,preview:4}[a.webkitVisibilityState||a.mozVisibilityState||a.visibilityState||""]||0},y=function(a){var b;a.mozVisibilityState?b="mozvisibilitychange":a.webkitVisibilityState?b="webkitvisibilitychange":a.visibilityState&&(b="visibilitychange");return b};var C=function(){this.g=r;this.k=s;this.j=!1;this.i=null;this.h=[];this.o={};if(z)this.i=q();else if(3==x(this.g)){this.i=q();var a=p(this.q,this);A&&(a=A("di::vch",a));this.p=a;var b=this.g,c=y(this.g);b.addEventListener?b.addEventListener(c,a,!1):b.attachEvent&&b.attachEvent("on"+c,a)}else B(this)},A;C.m=function(){return C.n?C.n:C.n=new C};var D=/^([^:]+:\/\/[^/]+)/m,G=/^\d*,(.+)$/m,z=!1,B=function(a){if(!a.j){a.j=!0;for(var b=0;b<a.h.length;++b)a.l.apply(a,a.h[b]);a.h=[]}};C.prototype.s=function(a,b){var c=b.target.u();(c=G.exec(c))&&(this.o[a]=c[1])};C.prototype.l=function(a,b){this.k.rvdt=this.i?q()-this.i:0;var c;if(c=this.t)t:{try{var d=D.exec(this.k.location.href),e=D.exec(a);if(d&&e&&d[1]==e[1]&&b){var f=p(this.s,this,b);this.t(a,f);c=!0;break t}}catch(u){}c=!1}c||w(this.k,a)};C.prototype.q=function(){if(3!=x(this.g)){B(this);var a=this.g,b=y(this.g),c=this.p;a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c)}};var H=/^true$/.test("")?!0:!1;var I={},J=function(a){var b=a.toString();a.name&&-1==b.indexOf(a.name)&&(b+=": "+a.name);a.message&&-1==b.indexOf(a.message)&&(b+=": "+a.message);if(a.stack){a=a.stack;var c=b;try{-1==a.indexOf(c)&&(a=c+"\n"+a);for(var d;a!=d;)d=a,a=a.replace(/((https?:\/..\/)[^\\/:]:\d+(?:.|\n))\2/,"$1");b=a.replace(/\n /g,"\n")}catch(e){b=c}}return b},M=function(a,b,c,d){var e=K,f,u=!0;try{f=b()}catch(h){try{var N=J(h);b="";h.fileName&&(b=h.fileName);var E=-1;h.lineNumber&&(E=h.lineNumber);var v;t:{try{v=c?c():"";break t}catch(S){}v=""}u=e(a,N,b,E,v)}catch(k){try{var O=J(k);a="";k.fileName&&(a=k.fileName);c=-1;k.lineNumber&&(c=k.lineNumber);K("pAR",O,a,c,void 0,void 0)}catch(F){L({context:"mRE",msg:F.toString()+"\n"+(F.stack||"")},void 0)}}if(!u)throw h;}finally{if(d)try{d()}catch(T){}}return f},K=function(a,b,c,d,e,f){a={context:a,msg:b.substring(0,512),eid:e&&e.substring(0,40),file:c,line:d.toString(),url:r.URL.substring(0,512),ref:r.referrer.substring(0,512)};P(a);L(a,f);return!0},L=function(a,b){try{if(Math.random()<(b||.01)){var c="/pagead/gen_204?id=jserror"+Q(a),d="http"+("https:"==s.location.protocol?"s":"")+"://pagead2.googlesyndication.com"+c,d=d.substring(0,2E3);w(s,d)}}catch(e){}},P=function(a){var b=a||{};t(I,function(a,d){b[d]=s[a]})},R=function(a,b,c,d,e){return function(){var f=arguments;return M(a,function(){return b.apply(c,f)},d,e)}},Q=function(a){var b="";t(a,function(a,d){if(0===a||a)b+="&"+d+"="+("function"==typeof encodeURIComponent?encodeURIComponent(a):escape(a))});return b};A=function(a,b,c,d){return R(a,b,void 0,c,d)};z=H;l("vu",R("vu",function(a,b){var c=a.replace("&","&"),d=/(google|doubleclick).\/pagead\/adview/.test(c),e=C.m();if(d){d="&vis="+x(e.g);b&&(d+="&ve=1");var f=c.indexOf("&adurl"),c=-1==f?c+d:c.substring(0,f)+d+c.substring(f)}e.j?e.l(c,b):e.h.push([c,b])}));l("vv",R("vv",function(){z&&B(C.m())}));})();</script><script>vu("https://securepubads.g.doubleclick.net/pagead/adview?ai\x3dCT-hWqm_DVfupBp…4Tx35m_agjwg_UN-tMEeAEAYAGiv2w_tjEnJG9AaAGIdgHAA\x26sigh\x3d6DjEED3OhJA")</script><img src="https://uswfb.adsrvr.org/bid/feedback/google?iid=75887f0b-7412-4ab0-85ae-fb…=Other&lat=33.882202&lon=-84.378304&tmpc=&daid=&vp=1&bp=8.02&dur=&crrelr=" width="1" height="1" style="display: none;"/><script type="text/javascript" src="https://ad.adsrvr.org/swfobject.js" > </script><script type="text/javascript"> var flashvars = false; var attributes = false; var params = { menu: "false", quality: "high", wmode: "transparent" }; swfobject.embedSWF("https://ad.adsrvr.org/cpsla2v/8d268be/13aeu2fn_300x250.swf?clickTAG=http%3A…75%26adurl%3Dhttp%3A%2F%2Fwww.axewhitelabel.com%2Faxe-body-wash&cb=206575", "1de322ef-9b11-47c3-a6f9-f007d380c788", "300", "250", "9.0.0", "https://ad.adsrvr.org/expressInstall.swf", flashvars, params, attributes); </script> <div id="1de322ef-9b11-47c3-a6f9-f007d380c788"> <a target="_blank" href="http://insight.adsrvr.org/track/clk?imp=75887f0b-7412-4ab0-85ae-fb5c1ed61a0…pub-7193423889248675%26adurl%3Dhttp://www.axewhitelabel.com/axe-body-wash" alt="Click Me"><img src="https://ad.adsrvr.org/cpsla2v/8d268be/13aeu2fn_300x250.jpg?cb=206575" border="0" /> <script type="text/javascript" src="//c.betrad.com/surly.js?;ad_w=300;ad_h=250;coid=334;nid=18029"></script><script src="https://secure.insightexpressai.com/adServer/adServerESI.aspx?bannerID=321949&siteID=bttg62b&creativeID=940587&tag=img"></script>\r\n<script src="https://cdn.doubleverify.com/dvtp_src.js?ctx=715607&cmp=0yrhiez&sid=45579&p…2fn&btadsrv=&crt=13aeu2fn&crtname=&chnl=&unit=&pid=&uid=&dvtagver=6.1.src" type="text/javascript"></script><img src="https://secure-us.imrworldwide.com/cgi-bin/m?ci=ENT120&am=4&ep=1&at=view&rt=banner&st=image&ca=cmp148105&cr=13aeu2fn&pc=bttg62b&r=206575"/><noscript class="MOAT-thetradedeskv275874568748?moatClientLevel1=8d268be&moatClientLevel2=0yrhiez&moatClientLevel3=bttg62b&moatClientSlicer1=www.pandora.com&zMoatImpressionId=75887f0b-7412-4ab0-85ae-fb5c1ed61a0d&…a2v&zMoatViewType=1&zMoatCreative=13aeu2fn&moatClientLevel4=-"><script src="https://z.moatads.com/thetradedeskv275874568748/moatad.js#moatClientLevel1=…uMzc4MzA0JnRtcGM9JmRhaWQ9JnZwPTEmYnA9OC4wMiZkdXI9JmNycmVscj0mc3Y9Z29vZ2xl" type="text/javascript"></script><iframe scrolling="no" frameborder=0 height=0 width=0 src="https://cm.g.doubleclick.net/push?client=ca-pub-7193423889248675" style="position:absolute"></iframe><script type="text/javascript">(function(){var h=this,k=function(a){var c=typeof a;if("object"==c)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return c;var b=Object.prototype.toString.call(a);if("[object Window]"==b)return"object";if("[object Array]"==b||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==b||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==c&&"undefined"==typeof a.call)return"object";return c},n=function(a){return"string"==typeof a},aa=function(a,c){var b=Array.prototype.slice.call(arguments,1);return function(){var c=b.slice();c.push.apply(c,arguments);return a.apply(this,c)}},p=Date.now||function(){return+new Date},q=function(a,c){var b=a.split("."),d=h;b[0]in d||!d.execScript||d.execScript("var "+b[0]);for(var e;b.length&&(e=b.shift());)b.length||void 0===c?d=d[e]?d[e]:d[e]={}:d[e]=c};var t=function(a,c,b,d,e){if(e)b=a+("&"+c+"="+b);else{var f="&"+c+"=",g=a.indexOf(f);0>g?b=a+f+b:(g+=f.length,f=a.indexOf("&",g),b=0<=f?a.substring(0,g)+b+a.substring(f):a.substring(0,g)+b)}return 2E3<b.length?void 0!==d?t(a,c,d,void 0,e):a:b};var ba=function(){var a=/[&\?]exk=([^& ]+)/.exec(u.location.href);return a&&2==a.length?a[1]:null};var da=function(){var a=ca;if(!a)return"";var c=/.[&#?]google_debug(=[^&])?(&.)?$/;try{var b=c.exec(decodeURIComponent(a));if(b)return b[1]&&1<b[1].length?b[1].substring(1):"true"}catch(d){}return""};var ea=function(a){var c=a.toString();a.name&&-1==c.indexOf(a.name)&&(c+=": "+a.name);a.message&&-1==c.indexOf(a.message)&&(c+=": "+a.message);if(a.stack){a=a.stack;var b=c;try{-1==a.indexOf(b)&&(a=b+"\n"+a);for(var d;a!=d;)d=a,a=a.replace(/((https?:\/..\/)[^\\/:]:\d+(?:.|\n))\2/,"$1");c=a.replace(/\n /g,"\n")}catch(e){c=b}}return c},v=function(a,c){a.google_image_requests||(a.google_image_requests=[]);var b=a.document.createElement("img");b.src=c;a.google_image_requests.push(b)};var w=document,u=window;var fa=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},ga=function(a,c){return a<c?-1:a>c?1:0};var x=Array.prototype,ha=x.indexOf?function(a,c,b){return x.indexOf.call(a,c,b)}:function(a,c,b){b=null==b?0:0>b?Math.max(0,a.length+b):b;if(n(a))return n(c)&&1==c.length?a.indexOf(c,b):-1;for(;b<a.length;b++)if(b in a&&a[b]===c)return b;return-1},ia=x.map?function(a,c,b){return x.map.call(a,c,b)}:function(a,c,b){for(var d=a.length,e=Array(d),f=n(a)?a.split(""):a,g=0;g<d;g++)g in f&&(e[g]=c.call(b,f[g],g,a));return e};var ja=function(a,c){for(var b in a)c.call(void 0,a[b],b,a)},ka=function(a){var c=arguments.length;if(1==c&&"array"==k(arguments[0]))return ka.apply(null,arguments[0]);for(var b={},d=0;d<c;d++)b[arguments[d]]=!0;return b};ka("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));var y=function(a,c){this.width=a;this.height=c};y.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};var z;a:{var la=h.navigator;if(la){var ma=la.userAgent;if(ma){z=ma;break a}}z=""}var A=function(a){return-1!=z.indexOf(a)};var B=function(){return A("Opera")||A("OPR")},na=function(){return(A("Chrome")||A("CriOS"))&&!B()&&!A("Edge")};var oa=function(){return A("iPhone")&&!A("iPod")&&!A("iPad")};var pa=B(),D=A("Trident")||A("MSIE"),qa=A("Edge"),ra=A("Gecko")&&!(-1!=z.toLowerCase().indexOf("webkit")&&!A("Edge"))&&!(A("Trident")||A("MSIE"))&&!A("Edge"),sa=-1!=z.toLowerCase().indexOf("webkit")&&!A("Edge"),ta=function(){var a=z;if(ra)return/rv\:([^\\);]+)(\)|;)/.exec(a);if(qa)return/Edge\/([\d\.]+)/.exec(a);if(D)return/\b(?:MSIE|rv): ;]+)(\)|;)/.exec(a);if(sa)return/WebKit\/(\S+)/.exec(a)},ua=function(){var a=h.document;return a?a.documentMode:void 0},va=function(){if(pa&&h.opera){var a=h.opera.version;return"function"==k(a)?a():a}var a="",c=ta();c&&(a=c?c[1]:"");return D&&(c=ua(),c>parseFloat(a))?String(c):a}(),wa={},xa=function(a){if(!wa[a]){for(var c=0,b=fa(String(va)).split("."),d=fa(String(a)).split("."),e=Math.max(b.length,d.length),f=0;0==c&&f<e;f++){var g=b[f]||"",l=d[f]||"",r=RegExp("(\\d)(\\D)","g"),F=RegExp("(\\d*)(\\D*)","g");do{var m=r.exec(g)||["","",""],C=F.exec(l)||["","",""];if(0==m[0].length&&0==C[0].length)break;c=ga(0==m[1].length?0:parseInt(m[1],10),0==C[1].length?0:parseInt(C[1],10))||ga(0==m[2].length,0==C[2].length)||ga(m[2],C[2])}while(0==c)}wa[a]=0<=c}},ya=h.document,za=ya&&D?ua()||("CSS1Compat"==ya.compatMode?parseInt(va,10):5):void 0;var Aa;if(!(Aa=!ra&&!D)){var Ba;if(Ba=D)Ba=9<=za;Aa=Ba}Aa||ra&&xa("1.9.1");D&&xa("9");var E=null,Ca=function(a,c){for(var b in a)Object.prototype.hasOwnProperty.call(a,b)&&c.call(null,a[b],b,a)};function G(a){return"function"==typeof encodeURIComponent?encodeURIComponent(a):escape(a)}var Da=function(){if(!w.body)return!1;if(!E){var a=w.createElement("iframe");a.style.display="none";a.id="anonIframe";E=a;w.body.appendChild(a)}return!0},Ea={};var Fa=!0,Ga={},Ja=function(a,c,b,d){var e=Ha,f,g=Fa;try{f=c()}catch(l){try{var r=ea(l);c="";l.fileName&&(c=l.fileName);var F=-1;l.lineNumber&&(F=l.lineNumber);g=e(a,r,c,F,b)}catch(m){try{var C=ea(m);a="";m.fileName&&(a=m.fileName);b=-1;m.lineNumber&&(b=m.lineNumber);Ha("pAR",C,a,b,void 0,void 0)}catch(Ra){Ia({context:"mRE",msg:Ra.toString()+"\n"+(Ra.stack||"")},void 0)}}if(!g)throw l;}finally{if(d)try{d()}catch(Ub){}}return f},Ha=function(a,c,b,d,e,f){var g={};if(e)try{e(g)}catch(l){}g.context=a;g.msg=c.substring(0,512);b&&(g.file=b);0<d&&(g.line=d.toString());g.url=w.URL.substring(0,512);g.ref=w.referrer.substring(0,512);Ka(g);Ia(g,f);return Fa},Ia=function(a,c){try{if(Math.random()<(c||.01)){var b="/pagead/gen_204?id=jserror"+La(a),d="http"+("http:"==u.location.protocol?"":"s")+"://pagead2.googlesyndication.com"+b,d=d.substring(0,2E3);v(u,d)}}catch(e){}},Ka=function(a){var c=a||{};Ca(Ga,function(a,d){c[d]=u[a]})},H=function(a,c,b,d,e){return function(){var f=arguments;return Ja(a,function(){return c.apply(b,f)},d,e)}},La=function(a){var c="";Ca(a,function(a,d){if(0===a||a)c+="&"+d+"="+G(String(a))});return c};var Ma=function(a,c,b){if("array"==k(c))for(var d=0;d<c.length;d++)Ma(a,String(c[d]),b);else null!=c&&b.push("&",a,""===c?"":"=",encodeURIComponent(String(c)))},Na=function(a,c,b){for(b=b||0;b<c.length;b+=2)Ma(c[b],c[b+1],a);return a},Oa=function(a,c){var b=2==arguments.length?Na([a],arguments[1],0):Na([a],arguments,1);if(b[1]){var d=b[0],e=d.indexOf("#");0<=e&&(b.push(d.substr(e)),b[0]=d=d.substr(0,e));e=d.indexOf("?");0>e?b[1]="?":e==d.length-1&&(b[1]=void 0)}return b.join("")};var Pa={j:947190538,l:947190541,m:947190542,h:79463068,i:79463069},Qa={g:"ud=1",f:"ts=0",o:"sc=1",c:"gz=1"};if(w&&w.URL)var ca=w.URL,Fa=!(ca&&0<da().length);var I=function(a,c,b,d){b=H(d||"osd_or_lidar::"+c,b,void 0,void 0,void 0);a.addEventListener?a.addEventListener(c,b,!1):a.attachEvent&&a.attachEvent("on"+c,b)},Sa=function(a,c,b){if(!(0>=c)){var d=0,e=function(){a();d++;d<c&&u.setTimeout(H(b,e,void 0,void 0,void 0),100)};e()}};var J=function(a,c){this.b=a||0;this.a=c||""},K=function(a,c){a.b&&(c[4]=a.b);a.a&&(c[12]=a.a)};J.prototype.match=function(a){return(this.b||this.a)&&(a.b||a.a)?this.a||a.a?this.a==a.a:this.b||a.b?this.b==a.b:!1:!1};J.prototype.toString=function(){var a=""+this.b;this.a&&(a+="-"+this.a);return a};var Ta=function(){var a=L,c=[];a.b&&c.push("adk="+a.b);a.a&&c.push("exk="+a.a);return c},M=function(a){var c=[];ja(a,function(a,d){var e=G(d),f=a;n(f)&&(f=G(f));c.push(e+"="+f)});return c.join("\n")},N=0,Ua=0,Va=function(a){var c=0,b=u;try{if(b&&b.Goog_AdSense_getAdAdapterInstance)return b}catch(d){}try{for(;b&&5>c;){if(b.google_osd_static_frame)return b;if(b.aswift_0&&(!a||b.aswift_0.google_osd_static_frame))return b.aswift_0;c++;b=b!=b.parent?b.parent:null}}catch(e){}return null},Wa=function(a,c,b,d,e){if(10<Ua)u.clearInterval(N);else if(++Ua,u.postMessage&&(c.b||c.a)){var f=Va(!0);if(f){var g={};K(c,g);g[0]="goog_request_monitoring";g[6]=a;g[16]=b;d&&d.length&&(g[17]=d.join(","));e&&(g[19]=e);try{var l=M(g);f.postMessage(l,"")}catch(r){}}}},Xa=function(a){var c=Va(!1),b=!c;!c&&u&&(c=u.parent);if(c&&c.postMessage)try{c.postMessage(a,""),b&&u.postMessage(a,"")}catch(d){}};var O=!1,P=function(a){if(a=a.match(/[\d]+/g))a.length=3};if(navigator.plugins&&navigator.plugins.length){var Ya=navigator.plugins["Shockwave Flash"];Ya&&(O=!0,Ya.description&&P(Ya.description));navigator.plugins["Shockwave Flash 2.0"]&&(O=!0)}else if(navigator.mimeTypes&&navigator.mimeTypes.length){var Za=navigator.mimeTypes["application/x-shockwave-flash"];(O=Za&&Za.enabledPlugin)&&P(Za.enabledPlugin.description)}else try{var Q=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),O=!0;P(Q.GetVariable("$version"))}catch($a){try{Q=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),O=!0}catch(ab){try{Q=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),O=!0,P(Q.GetVariable("$version"))}catch(bb){}}};var cb=A("Firefox"),db=oa()||A("iPod"),eb=A("iPad"),fb=A("Android")&&!(na()||A("Firefox")||B()||A("Silk")),gb=na(),hb=A("Safari")&&!(na()||A("Coast")||B()||A("Edge")||A("Silk")||A("Android"))&&!(oa()||A("iPad")||A("iPod"));var R=function(a){return(a=a.exec(z))?a[1]:""};(function(){if(cb)return R(/Firefox\/([0-9.]+)/);if(D||pa)return va;if(gb)return R(/Chrome\/([0-9.]+)/);if(hb&&!(oa()||A("iPad")||A("iPod")))return R(/Version\/([0-9.]+)/);if(db||eb){var a;if(a=/Version\/(\S+).Mobile\/(\S+)/.exec(z))return a[1]+"."+a[2]}else if(fb)return(a=R(/Android\s+([0-9.]+)/))?a:R(/Version\/([0-9.]+)/);return""})();var jb=function(){var a=u.parent&&u.parent!=u,c=a&&0<="//tpc.googlesyndication.com".indexOf(u.location.host);if(a&&u.name&&0==u.name.indexOf("google_ads_iframe")||c){var b;a=u||u;try{var d;if(a.document&&!a.document.body)d=new y(-1,-1);else{var e=(a||window).document,f="CSS1Compat"==e.compatMode?e.documentElement:e.body;d=(new y(f.clientWidth,f.clientHeight)).round()}b=d}catch(g){b=new y(-12245933,-12245933)}return ib(b)}b=u.document.getElementsByTagName("SCRIPT");return 0<b.length&&(b=b[b.length-1],b.parentElement&&b.parentElement.id&&0<b.parentElement.id.indexOf("_ad_container"))?ib(void 0,b.parentElement):null},ib=function(a,c){var b=kb("IMG",a,c);return b||(b=kb("IFRAME",a,c))?b:(b=kb("OBJECT",a,c))?b:null},kb=function(a,c,b){var d=document;b=b||d;d=a&&""!=a?a.toUpperCase():"";b=b.querySelectorAll&&b.querySelector&&d?b.querySelectorAll(d+""):b.getElementsByTagName(d||"");for(d=0;d<b.length;d++){var e=b[d];if("OBJECT"==a)a:{var f=e.getAttribute("height");if(null!=f&&0<f&&0==e.clientHeight)for(var f=e.children,g=0;g<f.length;g++){var l=f[g];if("OBJECT"==l.nodeName||"EMBED"==l.nodeName){e=l;break a}}}f=e.clientHeight;g=e.clientWidth;if(l=c)l=new y(g,f),l=Math.abs(c.width-l.width)<.1c.width&&Math.abs(c.height-l.height)<.1c.height;if(l||!c&&10<f&&10<g)return e}return null};var lb,S=0,T="",U=!1,V=!1,mb=!1,nb=!0,ob=!1,pb=!1,qb=!1,rb=!1,sb="",tb=0,ub=0,W=0,vb=[],L=null,wb="",xb=[],yb=null,zb=[],Ab=!1,Bb="",Cb="",Db=(new Date).getTime(),Eb=!1,Fb="",Gb=!1,Hb=["1","0","3"],X=0,Y=0,Ib=0,Jb="",Lb=function(a,c,b){U&&(nb||3!=(b||3)||pb)&&Kb(a,c,!0);(mb||V&&ob)&&Kb(a,c)},Mb=function(){var a=yb;return a?2!=a():!0},Kb=function(a,c,b){(c=c||wb)&&!Ab&&(2==Y||b)&&Mb()&&(c=Nb(c,b),v(a,c),rb=!0,b?U=!1:Ab=!0)},Nb=function(a,c){var b;b=c?"osdim":mb?"osd2":"osdtos";var d=["//pagead2.googlesyndication.com/activeview","?id=",b];"osd2"==b&&V&&ob&&d.push("&ts=1");T&&d.push("&avi=",T);lb&&d.push("&cid=",lb);d.push("&ti=1");d.push("&",a);d.push("&uc="+Ib);Eb?d.push("&tgt="+Fb):d.push("&tgt=nf");d.push("&cl="+(Gb?1:0));""!=sb&&(d.push("&lop=1"),b=p()-tb,d.push("&tslp="+b));d=d.join("");for(b=0;b<xb.length;b++){try{var e=xbb}catch(f){}var g="max_length";2<=e.length&&(3==e.length&&(g=e[2]),d=t(d,G(e[0]),G(e[1]),g))}2E3<d.length&&(d=d.substring(0,2E3));return d},Z=function(a,c){if(Bb){try{var b=t(Bb,"vi",a);Da()&&v(E.contentWindow,b)}catch(d){}0<=ha(Hb,a)&&(Bb="");var b=c||wb,e;e=t("//pagead2.googlesyndication.com/pagead/gen_204?id=sldb","avi",T);e=t(e,"vi",a);b&&(e+="&"+b);try{v(u,e)}catch(f){}}},Ob=function(){Z("-1")},Qb=function(a){if(a&&a.data&&n(a.data)){var c;var b=a.data;if(n(b)){c={};for(var b=b.split("\n"),d=0;d<b.length;d++){var e=b[d].indexOf("=");if(!(0>=e)){var f=Number(b[d].substr(0,e)),e=b[d].substr(e+1);switch(f){case 5:case 8:case 11:case 15:case 16:case 18:e="true"==e;break;case 4:case 7:case 6:case 14:case 20:case 21:case 22:case 23:e=Number(e);break;case 3:case 19:if("function"==k(decodeURIComponent))try{e=decodeURIComponent(e)}catch(g){throw Error("Error: URI malformed: "+e);}break;case 17:e=ia(decodeURIComponent(e).split(","),Number)}c[f]=e}}c=c[0]?c:null}else c=null;if(c&&(b=new J(c[4],c[12]),L&&L.match(b))){for(b=0;b<zb.length;b++)zbb;void 0!=c[18]&&(pb=c[18],pb||2!=W||(W=3,Pb()));b=c[0];if("goog_acknowledge_monitoring"==b)u.clearInterval(N),X=2;else if("goog_get_mode"==b){X=1;d={};L&&K(L,d);d[0]="goog_provide_mode";d[6]=Y;d[19]=Jb;d[16]=V;try{var l=M(d);a.source.postMessage(l,a.origin)}catch(r){}u.clearInterval(N);X=2}else"goog_update_data"==b?(wb=c[3],++Ib):"goog_image_request"==b&&(Lb(u,c[3]),c[5]||c[11]||Z("0",c[3]));if("goog_update_data"==b||"goog_image_request"==b)(1==Y||2==Y||U)&&c[5]&&(a=1==c[15]&&"goog_update_data"==b,ob=!0,Z("1"),Cb&&Mb()&&(l=Cb,Da()&&v(E.contentWindow,l),Cb=""),U&&!a&&(Kb(u,void 0,!0),qb=!0,ub=p()),3==W&&(W=4,Pb()),U||1!=Y||(Ab=!0)),(1==Y||2==Y||U)&&c[11]&&(V=!1,Z("3"),U&&(Kb(u,void 0,!0),1==W&&pb&&(W=2)))}}},Pb=function(){var a=u,c=W;0!=c&&1!=c&&Rb(a,"osdim","zas="+c)},Rb=function(a,c,b){c="//pagead2.googlesyndication.com/pagead/gen_204?id="+c+"&";var d=[];d.push("ovr_value="+S);d.push("avi="+T);L&&(d=d.concat(Ta()));d.push("tt="+((new Date).getTime()-Db));d.push(b);a.document&&a.document.referrer&&d.push("ref="+G(a.document.referrer));c+=d.join("&");try{v(a,c)}catch(e){}},Sb=function(){Lb(u);Z("0");2>X&&!V&&2==Y&&Rb(u,"osd2","hs="+X)},Tb=function(){var a={};K(L,a);a[0]="goog_dom_content_loaded";var c=M(a);try{Sa(function(){Xa(c)},10,"osd_listener::ldcl_int")}catch(b){}},Vb=function(){var a={};K(L,a);a[0]="goog_creative_loaded";var c=M(a);Sa(function(){Xa(c)},10,"osd_listener::lcel_int");Gb=!0},Wb=function(a){if(n(a)){a=a.split("&");for(var c=a.length-1;0<=c;c--){var b=a[c],d=Qa;b==d.g?(nb=!1,a.splice(c,1)):b==d.c?(W=1,a.splice(c,1)):b==d.f&&(V=!1,a.splice(c,1))}Jb=a.join("&")}},Xb=function(){if(!Eb){var a=jb();a&&(Eb=!0,Fb=a.tagName,a.complete||a.naturalWidth?Vb():I(a,"load",Vb,"osd_listener::creative_load"))}};q("osdlfm",H("osd_listener::init",function(a,c,b,d,e,f,g,l,r,F){S=a;Bb=c;Cb=d;U=f;lb=F;l&&Wb(l);V=f;1!=r&&2!=r&&3!=r||vb.push(Pa["MRC_TEST_"+r]);L=new J(e,ba());I(u,"load",Ob,"osd_listener::load");I(u,"message",Qb,"osd_listener::message");T=b||"";I(u,"unload",Sb,"osd_listener::unload");var m=u.document;!m.readyState||"complete"!=m.readyState&&"loaded"!=m.readyState?("msie"in Ea?Ea.msie:Ea.msie=-1!=navigator.userAgent.toLowerCase().indexOf("msie"))&&!window.opera?I(m,"readystatechange",function(){"complete"!=m.readyState&&"loaded"!=m.readyState||Tb()},"osd_listener::rsc"):I(m,"DOMContentLoaded",Tb,"osd_listener::dcl"):Tb();-1==S?Y=f?3:1:-2==S?Y=3:0<S&&(Y=2,mb=!0);V&&!mb&&-1==S&&(Y=2);L&&(L.b||L.a)&&(X=1,N=u.setInterval(H("osd_proto::reqm_int",aa(Wa,Y,L,V,vb,Jb),void 0,void 0,void 0),500));Sa(Xb,5,"osd_listener:sfc")}));q("osdlac",H("osd_listener::lac_ex",function(a){xb.push(a)}));q("osdlamrc",H("osd_listener::lamrc_ex",function(a){zb.push(a)}));q("osdsir",H("osd_listener::sir_ex",Lb));q("osdacrc",H("osd_listener::acrc_ex",function(a){yb=a}));q("osdpcls",H("osd_listener::acrc_ex",function(a){if(""==a||u==u.top||Ab||rb&&!qb)return!1;sb=a;if(qb){var c=T;T=a;var b=Nb(wb,!0);T=c;c=p()-ub;b=Oa(b,"tsvp",c);v(u,b)}T=""==T?a:T+","+a;tb=p();return!0}));}).call(this);osdlfm(-1,'','BGZBGqm_DVfupBpG4pAOi1IaYAwCOkqCOVwAAEAE4AcgBCeACAOAEAaAGIcITAxCAAQ','',3167524707,true,true,'ud\x3d1\x26la\x3d0\x26',3,'5GgEhznrANmAshoAA0s6ttH-kuk');</script>{"uid":1,"hostPeerName":"http://www.pandora.com\",\"initialGeometry\":\"{\\\"windowCoords_t\\\":221,\\\"windowCoords_r\\\":-743,\\\"windowCoords_b\\\":630,\\\"windowCoords_l\\\":2014,\\\"frameCoords_t\\\":0,\\\"frameCoords_r\\\":300,\\\"frameCoords_b\\\":250,\\\"frameCoords_l\\\":0,\\\"styleZIndex\\\":\\\"auto\\\",\\\"allowedExpansion_t\\\":0,\\\"allowedExpansion_r\\\":0,\\\"allowedExpansion_b\\\":0,\\\"allowedExpansion_l\\\":0,\\\"xInView\\\":1,\\\"yInView\\\":1}\",\"permissions\":\"{\\\"expandByOverlay\\\":true,\\\"expandByPush\\\":false,\\\"readCookie\\\":false,\\\"writeCookie\\\":false}\",\"metadata\":\"{\\\"shared\\\":{\\\"sf_ver\\\":\\\"1-0-2\\\",\\\"ck_on\\\":1,\\\"flash_ver\\\":\\\"18.0.0\\\"}}\",\"reportCreativeGeometry\":false}","iframeUrl":"http://tpc.googlesyndication.com/safeframe/1-0-2/html/container.html?n=1#xpc=sf-gdn-exp-1&p=http%3A//www.pandora.com"},"timeStamp":"2015-08-06T14:31:06.716Z","occurance":1},{"tabId":876,"type":"JS_ERROR","data":{"error":"Script error.","url":"","line":0,"column":0,"stack":null,"name":"","fromIframe":true,"iframeName":"","iframeUrl":"http://r1.ace.advertising.com/site=861268/size=300250/u=2/bnum=90607992/wkh…%252Fwww.pandora.com%252FradioAdEmbedGPT.html%253Fcb%253D14388727834808941"},"timeStamp":"2015-08-06T14:53:08.638Z","occurance":1}]}"

Cross origin iframe info

I wonder if it's possible for the scenario in which we know only the url for a cross origin iframe that we do a look up of all the frames to see if there is a name or other identifying information we can display to help the user.

For example, some ad iframes the product owner may only know what the name of it is called or maybe under which div with an id it was placed. That is likely to be more helpful than a long iframe url.

Add an options page for user settings

We need options to handle user based settings.

Initial Settings:

  1. "Persist Errors Across Navigation" -- this setting will keep logging errors for a tab's life time (tab.onDestroy will purge errors)
  2. "Only watch errors for" -- allows a user to specify when domains that we want to listen on.
  3. "Turn on Chrome Notifications"

Make errors shareable

As a product manager, I want to send the error message to the developer or include the message in a ticket

Errors originating from iFrames

Errors from iFrames will be caught because our content script runs on the iFrame itself. But we only show the errors from the storage where the url matches the hostkey for the tab open.

Add quotes to the zero state

I think quotes for the zero state on the popup about errors or something like that is a nice personal touch to give this app some more personality.

Make sure we don't introduce something that the user initially might think is an error at first glance. -- don't let it carry as much weight.

Screenshot and annotations

Having the ability to take a screenshot and even annotate it - like point to an area where the issue is showing it's face would be really cool.

console.error tracking

I think there is value in adding the option to listen for console.error logs as well. I think some frameworks thirdparty and internal development will opt to throwing a console.error for bad states rather than throw Error

Pandora's errors

I noticed on pandora.com, they have errors that just have the text "Error" as the main label. Check to see if this is as expected

Localization of the extension

We don't have very many bits of hard coded values. But we should i18n the app so that we can make that process easier when we grow the features

Allow catch surpressed errors

Facebook for example overrides the window.onerror function. It could be useful/interesting/fun to override that function before/after the client scripts override it so we could bring to light any, typically suppressed, errors.

Feature usage

We need a means by which to measure feature usage -- especially when we talk about optional settings.

We are using Google Analytics to track user engagement. Perhaps custom events will help with this.

Add window unload error watching

We are opting for storage of errors in local storage so that we can prepare for this task.

To help get errors in the unload phase we will try to listen for unload event listener assignment and store any errors that happen in that function. Then we will present the error upon the next time they open the extension.

Extension Errors

If extensions are causing JS errors, we need to specify that it was and extension and it's details

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.