This repository has been archived by the owner on May 6, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
options_compiled.js
26 lines (25 loc) · 10.4 KB
/
options_compiled.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
try{
'use strict';var h=this,k=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b},aa=function(a,b,c){return a.call.apply(a.bind,arguments)},ba=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)}},l=function(a,b,c){l=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?
aa:ba;return l.apply(null,arguments)},ca=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}},m=Date.now||function(){return+new Date},n=function(a,b){function c(){}c.prototype=b.prototype;a.w=b.prototype;a.prototype=new c;a.L=function(a,c,f){for(var g=Array(arguments.length-2),t=2;t<arguments.length;t++)g[t-2]=arguments[t];return b.prototype[c].apply(a,g)}};
var da=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},p=function(a,b){return a<b?-1:a>b?1:0};var q;a:{var ea=h.navigator;if(ea){var fa=ea.userAgent;if(fa){q=fa;break a}}q=""};var ga=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)};var ha=function(){this.h="";this.g=null},r=function(a){var b=new ha;b.h=a;b.g=0};r("<!DOCTYPE html>");r("");r("<br>");var ia="",u=/WebKit\/(\S+)/.exec(q);u&&(ia=u?u[1]:"");
var ja=ia,ka={},la=function(){if(!ka["528"]){for(var a=0,b=da(String(ja)).split("."),c=da("528").split("."),d=Math.max(b.length,c.length),e=0;0==a&&e<d;e++){var f=b[e]||"",g=c[e]||"",t=/(\d*)(\D*)/g,Ca=/(\d*)(\D*)/g;do{var x=t.exec(f)||["","",""],y=Ca.exec(g)||["","",""];if(0==x[0].length&&0==y[0].length)break;a=p(0==x[1].length?0:parseInt(x[1],10),0==y[1].length?0:parseInt(y[1],10))||p(0==x[2].length,0==y[2].length)||p(x[2],y[2])}while(0==a)}ka["528"]=0<=a}};
var v=function(a,b,c,d,e){this.reset(a,b,c,d,e)};v.prototype.g=null;var ma=0;v.prototype.reset=function(a,b,c,d,e){"number"==typeof e||ma++;this.l=d||m();this.o=a;this.s=b;this.h=c;delete this.g};v.prototype.getMessage=function(){return this.s};var w=function(a){this.o=a;this.h=this.l=this.g=null},z=function(a,b){this.name=a;this.value=b};z.prototype.toString=function(){return this.name};var na=new z("SHOUT",1200),oa=new z("SEVERE",1E3),pa=new z("WARNING",900),qa=new z("INFO",800),ra=new z("CONFIG",700);w.prototype.getChildren=function(){this.h||(this.h={});return this.h};var sa=function(a){return a.l?a.l:a.g?sa(a.g):null};
w.prototype.log=function(a,b,c){if(a.value>=sa(this).value)for("function"==k(b)&&(b=b()),a=new v(a,String(b),this.o),c&&(a.g=c),c="log:"+a.getMessage(),h.console&&(h.console.timeStamp?h.console.timeStamp(c):h.console.markTimeline&&h.console.markTimeline(c)),h.msWriteProfilerMark&&h.msWriteProfilerMark(c),c=this;c;)c=c.g}; var A={},B=null,ta=function(){B||(B=new w(""),A[""]=B,B.l=ra)},C=function(a){ta();var b;if(!(b=A[a])){b=new w(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=C(a.substr(0,c));c.getChildren()[d]=b;b.g=c;A[a]=b}return b};
C("image.collections.extension.Promises");var D=function(a){this.g=a},ua={"stars-gws":"https://www.google.com","stars-last-import-time":0};D.prototype.get=function(a,b){this.g.get(a,l(this.h,this,a,b))};D.prototype.h=function(a,b,c){null!=c||(c={});for(var d=0;d<a.length;++d){var e=a[d];e in c||(c[e]=ua[e])}b(c)};D.prototype.set=function(a){this.g.set(a)};
var E=function(){this.g=m()},va=new E;E.prototype.set=function(a){this.g=a};E.prototype.reset=function(){this.set(m())};E.prototype.get=function(){return this.g};var F=function(a){this.o=a||"";this.s=va};F.prototype.g=!0;F.prototype.h=!0;F.prototype.l=!1;var G=function(a){return 10>a?"0"+a:String(a)},wa=function(a,b){var c=(a.l-b)/1E3,d=c.toFixed(3),e=0;if(1>c)e=2;else for(;100>c;)e++,c*=10;for(;0<e--;)d=" "+d;return d},xa=function(a){F.call(this,a)};n(xa,F);
var ya=function(){l(this.o,this);this.g=new xa;this.g.h=!1;this.g.l=!1;this.h=this.g.g=!1;this.l="";this.s={}};
ya.prototype.o=function(a){if(!this.s[a.h]){var b;b=this.g;var c=[];c.push(b.o," ");if(b.h){var d=new Date(a.l);c.push("[",G(d.getFullYear()-2E3)+G(d.getMonth()+1)+G(d.getDate())+" "+G(d.getHours())+":"+G(d.getMinutes())+":"+G(d.getSeconds())+"."+G(Math.floor(d.getMilliseconds()/10)),"] ")}c.push("[",wa(a,b.s.get()),"s] ");c.push("[",a.h,"] ");c.push(a.getMessage());b.l&&(d=a.g)&&c.push("\n",d instanceof Error?d.message:d.toString());b.g&&c.push("\n");b=c.join("");if(c=za)switch(a.o){case na:H(c, "info",b);break;case oa:H(c,"error",b);break;case pa:H(c,"warn",b);break;default:H(c,"debug",b)}else this.l+=b}};var za=h.console,H=function(a,b,c){if(a[b])a[b](c);else a.log(c)};
var I=function(){this.o=this.o;this.g=this.g};I.prototype.o=!1;I.prototype.B=function(){this.o||(this.o=!0,this.l())};I.prototype.l=function(){if(this.g)for(;this.g.length;)this.g.shift()()};var Aa=function(a){a&&"function"==typeof a.B&&a.B()};la();la();var J=function(a,b){this.type=a;this.target=b};J.prototype.g=function(){};var K=function(a){J.call(this,a?a.type:"");this.h=this.target=null;a&&(this.type=a.type,this.target=a.target||a.srcElement,this.h=a,a.defaultPrevented&&this.g())};n(K,J);K.prototype.g=function(){K.w.g.call(this);var a=this.h;a.preventDefault?a.preventDefault():a.returnValue=!1};
var L="closure_listenable_"+(1E6*Math.random()|0),Ba=0;var Da=function(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.h=!!d;this.g=e;this.C=++Ba;this.removed=this.v=!1},M=function(a){a.removed=!0;a.listener=null;a.proxy=null;a.src=null;a.g=null};var N=function(a){this.src=a;this.g={};this.h=0},Ea=function(a,b,c,d,e){var f=b.toString();b=a.g[f];b||(b=a.g[f]=[],a.h++);var g=O(b,c,d,e);-1<g?(a=b[g],a.v=!1):(a=new Da(c,a.src,f,!!d,e),a.v=!1,b.push(a));return a};N.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.g))return!1;var e=this.g[a];b=O(e,b,c,d);return-1<b?(M(e[b]),Array.prototype.splice.call(e,b,1),0==e.length&&(delete this.g[a],this.h--),!0):!1};
var Fa=function(a,b){var c=b.type,d;if(d=c in a.g){d=a.g[c];var e;e=Array.prototype.indexOf.call(d,b,void 0);var f;(f=0<=e)&&Array.prototype.splice.call(d,e,1);d=f}d&&(M(b),0==a.g[c].length&&(delete a.g[c],a.h--))};N.prototype.removeAll=function(a){a=a&&a.toString();var b=0,c;for(c in this.g)if(!a||c==a){for(var d=this.g[c],e=0;e<d.length;e++)++b,M(d[e]);delete this.g[c];this.h--}return b}; var P=function(a,b,c,d,e){a=a.g[b.toString()];b=-1;a&&(b=O(a,c,d,e));return-1<b?a[b]:null},O=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.removed&&f.listener==b&&f.h==!!c&&f.g==d)return e}return-1};
var Q="closure_lm_"+(1E6*Math.random()|0),R={},Ga=0,Ha=function(a,b,c,d,e){if("array"==k(b)){for(var f=0;f<b.length;f++)Ha(a,b[f],c,d,e);return null}c=S(c);if(a&&a[L])a=a.listen(b,c,d,e);else{if(!b)throw Error("Invalid event type");var f=!!d,g=T(a);g||(a[Q]=g=new N(a));c=Ea(g,b,c,d,e);if(!c.proxy){d=Ia();c.proxy=d;d.src=a;d.listener=c;if(a.addEventListener)a.addEventListener(b.toString(),d,f);else if(a.attachEvent)a.attachEvent(Ja(b.toString()),d);else throw Error("addEventListener and attachEvent are unavailable.");
Ga++}a=c}return a},Ia=function(){var a=Ka,b=function(c){return a.call(b.src,b.listener,c)};return b},La=function(a,b,c,d,e){if("array"==k(b))for(var f=0;f<b.length;f++)La(a,b[f],c,d,e);else c=S(c),a&&a[L]?a.unlisten(b,c,d,e):a&&(a=T(a))&&(b=P(a,b,c,!!d,e))&&U(b)},U=function(a){if("number"!=typeof a&&a&&!a.removed){var b=a.src;if(b&&b[L])Fa(b.h,a);else{var c=a.type,d=a.proxy;b.removeEventListener?b.removeEventListener(c,d,a.h):b.detachEvent&&b.detachEvent(Ja(c),d);Ga--;(c=T(b))?(Fa(c,a),0==c.h&&(c.src=
null,b[Q]=null)):M(a)}}},Ja=function(a){return a in R?R[a]:R[a]="on"+a},Ka=function(a,b){var c;if(a.removed)c=!0;else{c=new K(b);var d=a.listener,e=a.g||a.src;a.v&&U(a);c=d.call(e,c)}return c},T=function(a){a=a[Q];return a instanceof N?a:null},V="__closure_events_fn_"+(1E9*Math.random()>>>0),S=function(a){if("function"==k(a))return a;a[V]||(a[V]=function(b){return a.handleEvent(b)});return a[V]};
var W=function(a){I.call(this);this.s=a;this.h={}};n(W,I);var Ma=[];W.prototype.listen=function(a,b,c,d){"array"!=k(b)&&(b&&(Ma[0]=b.toString()),b=Ma);for(var e=0;e<b.length;e++){var f=Ha(a,b[e],c||this.handleEvent,d||!1,this.s||this);if(!f)break;this.h[f.C]=f}return this};
W.prototype.unlisten=function(a,b,c,d,e){if("array"==k(b))for(var f=0;f<b.length;f++)this.unlisten(a,b[f],c,d,e);else c=c||this.handleEvent,e=e||this.s||this,c=S(c),d=!!d,b=a&&a[L]?P(a.h,String(b),c,d,e):a?(a=T(a))?P(a,b,c,d,e):null:null,b&&(U(b),delete this.h[b.C]);return this};W.prototype.removeAll=function(){ga(this.h,function(a,b){this.h.hasOwnProperty(b)&&U(a)},this);this.h={}};W.prototype.l=function(){W.w.l.call(this);this.removeAll()}; W.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};
var X=function(){I.call(this);this.h=new N(this)};n(X,I);X.prototype[L]=!0;X.prototype.removeEventListener=function(a,b,c,d){La(this,a,b,c,d)};X.prototype.l=function(){X.w.l.call(this);this.h&&this.h.removeAll(void 0)};X.prototype.listen=function(a,b,c,d){return Ea(this.h,String(a),b,c,d)};X.prototype.unlisten=function(a,b,c,d){return this.h.remove(String(a),b,c,d)};
var Y=function(){X.call(this);var a=document;this.F=a.getElementById("gws");this.s=a.getElementById("save_and_exit");this.s.disabled=!0;this.A=new D(chrome.storage.sync);this.D=new W(this);a=ca(Aa,this.D);this.o?a.call(void 0):(this.g||(this.g=[]),this.g.push(a))};n(Y,X);Y.h=function(){return Y.g?Y.g:Y.g=new Y};var Na=new ya;0!=Na.h&&(ta(),Na.h=!1);var Oa=C("image.collections.extension.Options");Y.prototype.I=function(a){this.F.value=a["stars-gws"]};
Y.prototype.H=function(){this.A.set({"stars-gws":this.F.value});this.s.disabled=!0;chrome.runtime.reload()};Y.prototype.G=function(){this.s.disabled=!1};var Z=Y.h();Oa&&Oa.log(qa,"Initializing extension options",void 0);Z.D.listen(Z.s,"click",Z.H).listen(document.body,"input",Z.G);var Pa={J:"stars-gws",K:"stars-last-import-time"},Qa=[],Ra=0,Sa;for(Sa in Pa)Qa[Ra++]=Pa[Sa];Z.A.get(Qa,l(Z.I,Z));
}catch(e){_DumpException(e)}
// Google Inc.