Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken in incognito mode in Chrome OS #59

Open
chstdu opened this issue Dec 10, 2022 · 6 comments
Open

Broken in incognito mode in Chrome OS #59

chstdu opened this issue Dec 10, 2022 · 6 comments

Comments

@chstdu
Copy link

chstdu commented Dec 10, 2022

System

  • OS name: ChromeOS
  • Browser name: Chrome
  • Browser version: 105.0.5195.134
  • Extension version: 3.1.0

Bug description

Clicking on a search engine / archive in context menu or in browser overlay does nothing when in incognito mode.

Logs

script.js:1 Uncaught (in promise) Error: No current window
    at script.js:1:9048
(anonymous) @ script.js:1
await in (anonymous) (async)
(anonymous) @ script.js:1
@chstdu
Copy link
Author

chstdu commented Dec 10, 2022

Stacktrace / script.js

(()=>{var e={1075:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,r,s,i){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new a(r,s||e,i),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],o]:e._events[c].push(o):(e._events[c]=o,e._eventsCount++),e}function i(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),o.prototype.eventNames=function(){var e,r,a=[];if(0===this._eventsCount)return a;for(r in e=this._events)t.call(e,r)&&a.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},o.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var a=0,s=r.length,i=new Array(s);a<s;a++)i[a]=r[a].fn;return i},o.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},o.prototype.emit=function(e,t,r,a,s,i){var o=n?n+e:e;if(!this._events[o])return!1;var c,l,g=this._events[o],u=arguments.length;if(g.fn){switch(g.once&&this.removeListener(e,g.fn,void 0,!0),u){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,t),!0;case 3:return g.fn.call(g.context,t,r),!0;case 4:return g.fn.call(g.context,t,r,a),!0;case 5:return g.fn.call(g.context,t,r,a,s),!0;case 6:return g.fn.call(g.context,t,r,a,s,i),!0}for(l=1,c=new Array(u-1);l<u;l++)c[l-1]=arguments[l];g.fn.apply(g.context,c)}else{var d,m=g.length;for(l=0;l<m;l++)switch(g[l].once&&this.removeListener(e,g[l].fn,void 0,!0),u){case 1:g[l].fn.call(g[l].context);break;case 2:g[l].fn.call(g[l].context,t);break;case 3:g[l].fn.call(g[l].context,t,r);break;case 4:g[l].fn.call(g[l].context,t,r,a);break;default:if(!c)for(d=1,c=new Array(u-1);d<u;d++)c[d-1]=arguments[d];g[l].fn.apply(g[l].context,c)}}return!0},o.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},o.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},o.prototype.removeListener=function(e,t,r,a){var s=n?n+e:e;if(!this._events[s])return this;if(!t)return i(this,s),this;var o=this._events[s];if(o.fn)o.fn!==t||a&&!o.once||r&&o.context!==r||i(this,s);else{for(var c=0,l=[],g=o.length;c<g;c++)(o[c].fn!==t||a&&!o[c].once||r&&o[c].context!==r)&&l.push(o[c]);l.length?this._events[s]=1===l.length?l[0]:l:i(this,s)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&i(this,t)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o},3145:function(e,t){var n,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,n=function(e){"use strict";if("undefined"==typeof browser||Object.getPrototypeOf(browser)!==Object.prototype){const t="The message port closed before a response was received.",n="Returning a Promise is the preferred way to send a reply from an onMessage/onMessageExternal listener, as the sendResponse will be removed from the specs (See https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage)",r=e=>{const r={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(0===Object.keys(r).length)throw new Error("api-metadata.json has not been included in browser-polyfill");class a extends WeakMap{constructor(e,t){super(t),this.createItem=e}get(e){return this.has(e)||this.set(e,this.createItem(e)),super.get(e)}}const s=(t,n)=>(...r)=>{e.runtime.lastError?t.reject(new Error(e.runtime.lastError.message)):n.singleCallbackArg||r.length<=1&&!1!==n.singleCallbackArg?t.resolve(r[0]):t.resolve(r)},i=e=>1==e?"argument":"arguments",o=(e,t,n)=>new Proxy(t,{apply:(t,r,a)=>n.call(r,e,...a)});let c=Function.call.bind(Object.prototype.hasOwnProperty);const l=(e,t={},n={})=>{let r=Object.create(null),a={has:(t,n)=>n in e||n in r,get(a,g,u){if(g in r)return r[g];if(!(g in e))return;let d=e[g];if("function"==typeof d)if("function"==typeof t[g])d=o(e,e[g],t[g]);else if(c(n,g)){let t=((e,t)=>function(n,...r){if(r.length<t.minArgs)throw new Error(`Expected at least ${t.minArgs} ${i(t.minArgs)} for ${e}(), got ${r.length}`);if(r.length>t.maxArgs)throw new Error(`Expected at most ${t.maxArgs} ${i(t.maxArgs)} for ${e}(), got ${r.length}`);return new Promise(((a,i)=>{if(t.fallbackToNoCallback)try{n[e](...r,s({resolve:a,reject:i},t))}catch(s){console.warn(`${e} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,s),n[e](...r),t.fallbackToNoCallback=!1,t.noCallback=!0,a()}else t.noCallback?(n[e](...r),a()):n[e](...r,s({resolve:a,reject:i},t))}))})(g,n[g]);d=o(e,e[g],t)}else d=d.bind(e);else if("object"==typeof d&&null!==d&&(c(t,g)||c(n,g)))d=l(d,t[g],n[g]);else{if(!c(n,"*"))return Object.defineProperty(r,g,{configurable:!0,enumerable:!0,get:()=>e[g],set(t){e[g]=t}}),d;d=l(d,t[g],n["*"])}return r[g]=d,d},set:(t,n,a,s)=>(n in r?r[n]=a:e[n]=a,!0),defineProperty:(e,t,n)=>Reflect.defineProperty(r,t,n),deleteProperty:(e,t)=>Reflect.deleteProperty(r,t)},g=Object.create(e);return new Proxy(g,a)},g=e=>({addListener(t,n,...r){t.addListener(e.get(n),...r)},hasListener:(t,n)=>t.hasListener(e.get(n)),removeListener(t,n){t.removeListener(e.get(n))}}),u=new a((e=>"function"!=typeof e?e:function(t){const n=l(t,{},{getContent:{minArgs:0,maxArgs:0}});e(n)}));let d=!1;const m=new a((e=>"function"!=typeof e?e:function(t,r,a){let s,i,o=!1,c=new Promise((e=>{s=function(t){d||(console.warn(n,(new Error).stack),d=!0),o=!0,e(t)}}));try{i=e(t,r,s)}catch(e){i=Promise.reject(e)}const l=!0!==i&&((g=i)&&"object"==typeof g&&"function"==typeof g.then);var g;if(!0!==i&&!l&&!o)return!1;return(l?i:c).then((e=>{a(e)}),(e=>{let t;t=e&&(e instanceof Error||"string"==typeof e.message)?e.message:"An unexpected error occurred",a({__mozWebExtensionPolyfillReject__:!0,message:t})})).catch((e=>{console.error("Failed to send onMessage rejected reply",e)})),!0})),h=({reject:n,resolve:r},a)=>{e.runtime.lastError?e.runtime.lastError.message===t?r():n(new Error(e.runtime.lastError.message)):a&&a.__mozWebExtensionPolyfillReject__?n(new Error(a.message)):r(a)},f=(e,t,n,...r)=>{if(r.length<t.minArgs)throw new Error(`Expected at least ${t.minArgs} ${i(t.minArgs)} for ${e}(), got ${r.length}`);if(r.length>t.maxArgs)throw new Error(`Expected at most ${t.maxArgs} ${i(t.maxArgs)} for ${e}(), got ${r.length}`);return new Promise(((e,t)=>{const a=h.bind(null,{resolve:e,reject:t});r.push(a),n.sendMessage(...r)}))},p={devtools:{network:{onRequestFinished:g(u)}},runtime:{onMessage:g(m),onMessageExternal:g(m),sendMessage:f.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:f.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},v={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return r.privacy={network:{"*":v},services:{"*":v},websites:{"*":v}},l(e,p,r)};if("object"!=typeof chrome||!chrome||!chrome.runtime||!chrome.runtime.id)throw new Error("This script should only be loaded in a browser extension.");e.exports=r(chrome)}else e.exports=browser},void 0===(r=n.apply(t,[e]))||(e.exports=r)},3411:(e,t,n)=>{"use strict";n.r(t),n.d(t,{initStorage:()=>u,migrateLegacyStorage:()=>d});var r=n(3145),a=n.n(r);const s=function(e,t,n){var r=null==e?0:e.length;return r?function(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(a);++r<a;)s[r]=e[r+t];return s}(e,t=null==t?0:t,n=void 0===n?r:n):[]};var i=n(7019),o=Math.max;const c=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var a=null==n?0:n;return a<0&&(a=o(r+a,0)),(0,i.Z)(e,t,a)};async function l(e,{area:t="local"}={}){return async function(e,{area:t="local"}={}){const n=await async function(e,t){return e("./config.json").revisions[t]}(e,t),r=await async function(e="local"){const{storageVersion:t}=await a().storage[e].get("storageVersion");return t}(t),i=(l=null==(o=n)?0:o.length)?o[l-1]:void 0;var o,l;if(r===i)return;const g=s(n,c(n,r)+1,c(n,i)+1);console.log(`Migrating storage (${t}): ${r} => ${i}`);for(const n of g){const r=e(`./revisions/${t}/${n}.js`);console.log(`Applying revision (${t}): ${r.revision} - ${r.message}`),await r.upgrade()}}(e,{area:t})}var g=n(1068);async function u(){let{area:e="local"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=n(3409);return l(t,{area:e})}async function d(){if(await(0,g.isStorageArea)({area:"sync"})){const{storageVersion:e}=await a().storage.sync.get("storageVersion");if(e&&e.length<14){const{storageVersion:e}=await a().storage.local.get("storageVersion");if(!e||e.length<14){const e=await a().storage.sync.get(null);await a().storage.local.clear(),await a().storage.local.set(e),await a().storage.sync.clear()}}}}},882:(e,t,n)=>{"use strict";n.r(t),n.d(t,{message:()=>a,revision:()=>s,upgrade:()=>o});var r=n(3145);const a="Support event pages",s="20211228050445_support_event_pages",i=n.n(r)().storage.local;async function o(){const e={},{engines:t,disabledEngines:n,searchCount:r}=await i.get(["engines","disabledEngines","searchCount"]),a=["sogou","naver","exalead","webcite"];return e.engines=t.filter((function(e){return!a.includes(e)})),e.disabledEngines=n.filter((function(e){return!a.includes(e)})),e.taskRegistry={lastTaskStart:0,tabs:{},tasks:{}},e.storageRegistry={},e.lastStorageCleanup=0,e.lastEngineAccessCheck=0,e.setContextMenuEvent=0,e.searchModeContextMenu="tab",e.searchModeAction="tab",e.useCount=r,await i.remove(["searchCount","openNewTab"]),e.storageVersion=s,i.set(e)}},2799:(e,t,n)=>{"use strict";n.r(t),n.d(t,{message:()=>a,revision:()=>s,upgrade:()=>o});var r=n(3145);const a="Add showEngineIcons",s="20220102035029_add_showengineicons",i=n.n(r)().storage.local;async function o(){const e={showEngineIcons:!0};return e.storageVersion=s,i.set(e)}},180:(e,t,n)=>{"use strict";n.r(t),n.d(t,{message:()=>a,revision:()=>s,upgrade:()=>o});var r=n(3145);const a="Add search engines",s="20220102051642_add_search_engines",i=n.n(r)().storage.local;async function o(){const e={},{engines:t,disabledEngines:n}=await i.get(["engines","disabledEngines"]),r=["baidu","qihoo"];return e.engines=t.filter((function(e){return!r.includes(e)})),e.disabledEngines=n.filter((function(e){return!r.includes(e)})),e.engines=e.engines.concat(["baidu","yahoo","qihoo","mailru"]),e.disabledEngines.push("mailru"),e.storageVersion=s,i.set(e)}},5863:(e,t,n)=>{"use strict";n.r(t),n.d(t,{message:()=>a,revision:()=>s,upgrade:()=>o});var r=n(3145);const a="Add openCurrentDoc",s="20220114113759_add_opencurrentdoc",i=n.n(r)().storage.local;async function o(){const e={openCurrentDocAction:!0,openCurrentDocContextMenu:!0};return e.storageVersion=s,i.set(e)}},5846:(e,t,n)=>{"use strict";n.r(t),n.d(t,{message:()=>a,revision:()=>s,upgrade:()=>o});var r=n(3145);const a="Initial version",s="SJltHx2rW",i=n.n(r)().storage.local;async function o(){const e={engines:["archiveOrg","google","googleText","bing","yandex","archiveIs","memento","webcite","exalead","gigablast","sogou","qihoo","baidu","naver","yahooJp","megalodon"],disabledEngines:["googleText","memento","webcite","exalead","gigablast","qihoo","baidu","naver","yahooJp","megalodon"],showInContextMenu:"link",searchAllEnginesContextMenu:"sub",searchAllEnginesAction:"sub",showPageAction:!0,openNewTab:!0,tabInBackgound:!1};return e.storageVersion=s,i.set(e)}},3075:(e,t,n)=>{"use strict";n.r(t),n.d(t,{message:()=>a,revision:()=>s,upgrade:()=>o});var r=n(3145);const a="Add installTime, searchCount and contribPageLastOpen",s="SkhmnNhMG",i=n.n(r)().storage.local;async function o(){const e={};return e.installTime=(new Date).getTime(),e.searchCount=0,e.contribPageLastOpen=0,e.storageVersion=s,i.set(e)}},3985:(e,t,n)=>{"use strict";n.r(t),n.d(t,{message:()=>a,revision:()=>s,upgrade:()=>o});var r=n(3145);const a="Set showPageAction to false",s="rJXbW1ZHmM",i=n.n(r)().storage.local;async function o(){const e={showPageAction:!1};return e.storageVersion=s,i.set(e)}},3183:(e,t,n)=>{"use strict";n.r(t),n.d(t,{message:()=>a,revision:()=>s,upgrade:()=>o});var r=n(3145);const a="Add archiveOrgAll and archiveIsAll",s="yjRtkzy",i=n.n(r)().storage.local;async function o(){const e={},{engines:t,disabledEngines:n}=await i.get(["engines","disabledEngines"]);return t.splice(t.indexOf("archiveOrg")+1,0,"archiveOrgAll"),t.splice(t.indexOf("archiveIs")+1,0,"archiveIsAll"),e.engines=t,e.disabledEngines=n.concat(["archiveOrgAll","archiveIsAll"]),e.storageVersion=s,i.set(e)}},1068:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g,isStorageArea:()=>i,isStorageReady:()=>c,ensureStorageReady:()=>l});var r=n(3145),a=n.n(r),s=n(5221);async function i(){let{area:e="local"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return await a().storage[e].get(""),!0}catch(e){return!1}}const o={};async function c(){let{area:e="local"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o[e])return!0;{const{storageVersion:t}=await a().storage[e].get("storageVersion");if(t&&t===s.n_[e])return o[e]=!0,!0}return!1}async function l(){let{area:e="local"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!o[e])return new Promise(((t,n)=>{let r;const a=async function(){await c({area:e})?(window.clearTimeout(s),t()):r?n(new Error(`Storage (${e}) is not ready`)):window.setTimeout(a,30)},s=window.setTimeout((function(){r=!0}),6e4);a()}))}const g={get:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,{area:t="local"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return await l({area:t}),a().storage[t].get(e)},set:async function(e){let{area:t="local"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return await l({area:t}),a().storage[t].set(e)},remove:async function(e){let{area:t="local"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return await l({area:t}),a().storage[t].remove(e)},clear:async function(){let{area:e="local"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return await l({area:e}),a().storage[e].clear()}}},5221:(e,t,n)=>{"use strict";n.d(t,{W9:()=>r,pL:()=>a,n_:()=>s});const r="chrome",a=!0,s={local:"20220114113759_add_opencurrentdoc"}},3409:(e,t,n)=>{var r={"./config.json":5054,"./init.js":3411,"./revisions/local/20211228050445_support_event_pages.js":882,"./revisions/local/20220102035029_add_showengineicons.js":2799,"./revisions/local/20220102051642_add_search_engines.js":180,"./revisions/local/20220114113759_add_opencurrentdoc.js":5863,"./revisions/local/SJltHx2rW.js":5846,"./revisions/local/SkhmnNhMG.js":3075,"./revisions/local/rJXbW1ZHmM.js":3985,"./revisions/local/yjRtkzy.js":3183,"./storage.js":1068,"storage/config.json":5054,"storage/init.js":3411,"storage/revisions/local/20211228050445_support_event_pages.js":882,"storage/revisions/local/20220102035029_add_showengineicons.js":2799,"storage/revisions/local/20220102051642_add_search_engines.js":180,"storage/revisions/local/20220114113759_add_opencurrentdoc.js":5863,"storage/revisions/local/SJltHx2rW.js":5846,"storage/revisions/local/SkhmnNhMG.js":3075,"storage/revisions/local/rJXbW1ZHmM.js":3985,"storage/revisions/local/yjRtkzy.js":3183,"storage/storage.js":1068};function a(e){var t=s(e);return n(t)}function s(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=s,e.exports=a,a.id=3409},7019:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t,n){for(var r=n-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}},5054:e=>{"use strict";e.exports=JSON.parse('{"revisions":{"local":["SJltHx2rW","SkhmnNhMG","rJXbW1ZHmM","yjRtkzy","20211228050445_support_event_pages","20220102035029_add_showengineicons","20220102051642_add_search_engines","20220114113759_add_opencurrentdoc"],"sync":[]}}')}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e,t=n(3145),r=n.n(t),a=new Uint8Array(16);function s(){if(!e&&!(e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(a)}const i=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,o=function(e){return"string"==typeof e&&i.test(e)};for(var c=[],l=0;l<256;++l)c.push((l+256).toString(16).substr(1));const g=function(e,t,n){var r=(e=e||{}).random||(e.rng||s)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var a=0;a<16;++a)t[n+a]=r[a];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(c[e[t+0]]+c[e[t+1]]+c[e[t+2]]+c[e[t+3]]+"-"+c[e[t+4]]+c[e[t+5]]+"-"+c[e[t+6]]+c[e[t+7]]+"-"+c[e[t+8]]+c[e[t+9]]+"-"+c[e[t+10]]+c[e[t+11]]+c[e[t+12]]+c[e[t+13]]+c[e[t+14]]+c[e[t+15]]).toLowerCase();if(!o(n))throw TypeError("Stringified UUID is invalid");return n}(r)};var u=n(1075);class d extends Error{constructor(e){super(e),this.name="TimeoutError"}}class m{constructor(){Object.defineProperty(this,"_queue",{enumerable:!0,configurable:!0,writable:!0,value:[]})}enqueue(e,t){var n;const r={priority:(t={priority:0,...t}).priority,run:e};if(this.size&&(null===(n=this._queue[this.size-1])||void 0===n?void 0:n.priority)>=t.priority)return void this._queue.push(r);const a=function(e,t,n){let r=0,a=e.length;for(;a>0;){const n=Math.trunc(a/2);let i=r+n;s=e[i],t.priority-s.priority<=0?(r=++i,a-=n+1):a=n}var s;return r}(this._queue,r);this._queue.splice(a,0,r)}dequeue(){const e=this._queue.shift();return null==e?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}const h=()=>{},f=new d;class p extends u{constructor(e){var t,n,r,a;if(super(),Object.defineProperty(this,"_carryoverConcurrencyCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isIntervalIgnored",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_intervalCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_intervalCap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_interval",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_intervalEnd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_intervalId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_timeoutId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_queue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_queueClass",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pendingCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_concurrency",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isPaused",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_resolveEmpty",{enumerable:!0,configurable:!0,writable:!0,value:h}),Object.defineProperty(this,"_resolveIdle",{enumerable:!0,configurable:!0,writable:!0,value:h}),Object.defineProperty(this,"_timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_throwOnTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!("number"==typeof(e={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:m,...e}).intervalCap&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${null!==(n=null===(t=e.intervalCap)||void 0===t?void 0:t.toString())&&void 0!==n?n:""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${null!==(a=null===(r=e.interval)||void 0===r?void 0:r.toString())&&void 0!==a?a:""}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===Number.POSITIVE_INFINITY||0===e.interval,this._intervalCap=e.intervalCap,this._interval=e.interval,this._queue=new e.queueClass,this._queueClass=e.queueClass,this.concurrency=e.concurrency,this._timeout=e.timeout,this._throwOnTimeout=!0===e.throwOnTimeout,this._isPaused=!1===e.autoStart}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=h,0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=h,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){const e=Date.now();if(void 0===this._intervalId){const t=this._intervalEnd-e;if(!(t<0))return void 0===this._timeoutId&&(this._timeoutId=setTimeout((()=>{this._onResumeInterval()}),t)),!0;this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}return!1}_tryToStartAnother(){if(0===this._queue.size)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();return!!t&&(this.emit("active"),t(),e&&this._initializeIntervalIfNeeded(),!0)}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval((()=>{this._onInterval()}),this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){0===this._intervalCount&&0===this._pendingCount&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(e){if(!("number"==typeof e&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,t={}){return new Promise(((n,r)=>{this._queue.enqueue((async()=>{this._pendingCount++,this._intervalCount++;try{const a=void 0===this._timeout&&void 0===t.timeout?e():function(e,t,n,r){let a;const s=new Promise(((s,i)=>{if("number"!=typeof t||1!==Math.sign(t))throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);t!==Number.POSITIVE_INFINITY?(r={customTimers:{setTimeout,clearTimeout},...r},a=r.customTimers.setTimeout.call(void 0,(()=>{try{s(n())}catch(e){i(e)}}),t),(async()=>{try{s(await e)}catch(e){i(e)}finally{r.customTimers.clearTimeout.call(void 0,a)}})()):s(e)}));return s.clear=()=>{clearTimeout(a),a=void 0},s}(Promise.resolve(e()),void 0===t.timeout?this._timeout:t.timeout,(()=>{(void 0===t.throwOnTimeout?this._throwOnTimeout:t.throwOnTimeout)&&r(f)})),s=await a;n(s),this.emit("completed",s)}catch(e){r(e),this.emit("error",e)}this._next()}),t),this._tryToStartAnother(),this.emit("add")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(0!==this._queue.size)return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t(),e()}}))}async onSizeLessThan(e){if(!(this._queue.size<e))return new Promise((t=>{const n=()=>{this._queue.size<e&&(this.removeListener("next",n),t())};this.on("next",n)}))}async onIdle(){if(0!==this._pendingCount||0!==this._queue.size)return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t(),e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}var v=n(3411),A=n(1068),w=n(5221);const b=r().i18n.getMessage;function y(){r().runtime.lastError&&console.log(`Error: ${r().runtime.lastError}`)}function x(e){return new Promise((t=>setTimeout(t,e)))}async function _(){let{url:e="",token:t="",index:n=null,active:a=!0,openerTabId:s=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e||(e=I(t));const i={url:e,active:a};null!==n&&(i.index=n),null===s||s===r().tabs.TAB_ID_NONE||await P()||(i.openerTabId=s);let o=await r().tabs.create(i);if("samsung"===w.W9&&null!==n){let t=0;for(;t<100&&(!o||o.url!==e||o.index!==n);)[o]=await r().tabs.query({lastFocusedWindow:!0,index:n}),await x(20),t+=1}return o}function I(e){return e||(e=g()),`${r().runtime.getURL("/src/tab/index.html")}?id=${e}`}function C(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"document_start";return r().tabs.executeScript(t,{frameId:n,runAt:a,code:e})}function T(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"document_start";return r().tabs.executeScript(t,{frameId:n,runAt:a,file:e})}async function k(){const[e]=await r().tabs.query({lastFocusedWindow:!0,active:!0});return e}async function E(){let e,t,{fallback:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("samsung"===w.W9)return{os:"android",arch:""};try{({os:e,arch:t}=await r().runtime.getPlatformInfo())}catch(a){if(!n)throw a;({os:e,arch:t}=await r().runtime.sendMessage({id:"getPlatform"}))}return"win"===e?e="windows":"mac"===e&&(e="macos"),"MacIntel"!==navigator.platform||"ios"!==e&&void 0===navigator.standalone||(e="ipados"),"x86-32"===t?t="386":"x86-64"===t?t="amd64":t.startsWith("arm")&&(t="arm"),{os:e,arch:t}}async function P(){const{os:e}=await E();return"android"===e}async function j(){const{os:e}=await E();return["android","ios","ipados"].includes(e)}const S=Array.isArray,O=function(){if(!arguments.length)return[];var e=arguments[0];return S(e)?e:[e]};var q=n(7019);const M=function(e,t){return!(null==e||!e.length)&&(0,q.Z)(e,t,0)>-1},R=function(e,t,n){for(var r=-1,a=null==e?0:e.length;++r<a;)if(n(t,e[r]))return!0;return!1},L=function(e,t){return!(null==e||!e.length)&&(0,q.Z)(e,t,0)>-1},$=function(e,t,n,r){var a,s=-1,i=M,o=!0,c=e.length,l=[],g=t.length;if(!c)return l;n&&(t=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}(t,(a=n,function(e){return a(e)}))),r?(i=R,o=!1):t.length>=200&&(i=L,o=!1,t=new O(t));e:for(;++s<c;){var u=e[s],d=null==n?u:n(u);if(u=r||0!==u?u:0,o&&d==d){for(var m=g;m--;)if(t[m]===d)continue e;l.push(u)}else i(t,d,r)||l.push(u)}return l},N=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e},U="object"==typeof global&&global&&global.Object===Object&&global;var D="object"==typeof self&&self&&self.Object===Object&&self,W=(U||D||Function("return this")()).Symbol;var B=W?W.isConcatSpreadable:void 0;const F=function(e){return S(e)||!!(B&&e&&e[B])},V=function e(t,n,r,a,s){var i=-1,o=t.length;for(r||(r=F),s||(s=[]);++i<o;){var c=t[i];n>0&&r(c)?n>1?e(c,n-1,r,a,s):N(s,c):a||(s[s.length]=c)}return s},z=function(e){return e},H=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)};var J=Math.max;var K=Object.prototype.toString;const Z=function(e){if(!function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}(e))return!1;var t=function(e){return K.call(e)}(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},G=function(e){return function(e){return null!=e&&"object"==typeof e}(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!Z(e)}(e)};var Q,X=function(e,t,n){return t=J(void 0===t?e.length-1:t,0),function(){for(var r=arguments,a=-1,s=J(r.length-t,0),i=Array(s);++a<s;)i[a]=r[t+a];a=-1;for(var o=Array(t+1);++a<t;)o[a]=r[a];return o[t]=n(i),H(e,this,o)}}((function(e,t){return G(e)?$(e,V(t,1,G,!0)):[]}),Q,z);const Y=X,ee=["engines","disabledEngines","showInContextMenu","searchAllEnginesContextMenu","searchAllEnginesAction","showPageAction","tabInBackgound","searchModeAction","searchModeContextMenu","showEngineIcons","openCurrentDocAction","openCurrentDocContextMenu"],te={archiveOrg:{target:"https://web.archive.org/web/{url}"},archiveOrgAll:{target:"https://web.archive.org/web/*/{url}"},google:{target:"https://webcache.googleusercontent.com/search?q=cache:{url}"},googleText:{target:"https://webcache.googleusercontent.com/search?strip=1&q=cache:{url}"},bing:{target:"https://www.bing.com/search?q=url:{url}&go=Search&qs=bs&form=QBRE",isExec:!0},yandex:{target:"https://www.yandex.com/",isExec:!0},archiveIs:{target:"https://archive.is/newest/{url}"},archiveIsAll:{target:"https://archive.is/{url}"},memento:{target:"http://timetravel.mementoweb.org/memento/{date}/{url}"},gigablast:{target:"https://www.gigablast.com/search?q=url:{url}",isExec:!0},qihoo:{target:"https://www.so.com/s?ie=utf-8&fr=none&src=home_www&q={url}",isExec:!0},baidu:{target:"https://www.baidu.com/s?wd={url}&ie=utf-8",isExec:!0},yahooJp:{target:"https://search.yahoo.co.jp/search?ei=UTF-8&p={url}",isExec:!0},megalodon:{target:"https://megalodon.jp/?url={url}",isExec:!0},mailru:{target:"https://go.mail.ru/search?q={url}&src=go&frm=main&fr=main",isExec:!0},yahoo:{target:"https://search.yahoo.com/search?p=url:{url}",isExec:!0}},ne=[400,403,404,408,410,429,451,500,502,503,504,444,450,509,530,598,520,521,522,523,524,525,526,527],re={archiveOrg:["web.archive.org"],archiveIs:["archive.is","archive.today","archive.ph","archive.vn","archive.fo","archive.li","archive.md","archiveiya74codqgiixo33q62qlrqtkgmcitqx5u2oeqnmn5bpcbiyd.onion"],google:["webcache.googleusercontent.com"],bing:["cc.bingj.com"],yandex:["yandexwebcache.net"],yahooJp:["cache.yahoofs.jp"],qihoo:["c.360webcache.com"],mailru:["hl.mailru.su"]},ae={archiveOrg:["web.archive.org"],archiveIs:["archive.is","archive.today","archive.ph","archive.vn","archive.fo","archive.li","archive.md","archiveiya74codqgiixo33q62qlrqtkgmcitqx5u2oeqnmn5bpcbiyd.onion"],google:["webcache.googleusercontent.com"]},se={archiveOrg:/^https?:\/\/web\.archive\.org\/web\/[0-9]+\/(.*)/i,archiveIs:/^https?:\/\/(?:archive\.(?:is|today|ph|vn|fo|li|md)|archiveiya74codqgiixo33q62qlrqtkgmcitqx5u2oeqnmn5bpcbiyd.onion)\/o\/.*?\/(.*)/i,google:/^https?:\/\/webcache\.googleusercontent\.com\/search.*[?&]q=cache:.*$/i};async function ie(e){return void 0===e&&(e=await A.default.get(["engines","disabledEngines"])),Y(e.engines,e.disabledEngines)}async function oe(e){const t=[];for(const n of e){const e=te[n].isExec,r=te[n].isTaskId;t.push({engine:n,isExec:e,isTaskId:r,sendsReceipt:e||r})}return t}function ce(){let{message:e,messageId:t,title:n,type:a="info"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n||(n=b("extensionName")),t&&(e=b(t)),"safari"===w.W9?r().runtime.sendNativeMessage("application.id",{id:"notification",message:e}):r().notifications.create(`wa-notification-${a}`,{type:"basic",title:n,message:e,iconUrl:"/src/assets/icons/app/icon-64.png"})}function le(e){try{if(e.length>2048)return;const t=new URL(e);if(/^(?:https?|ftp):$/i.test(t.protocol))return!0}catch(e){}}async function ge(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";await A.default.set({contribPageLastOpen:(new Date).getTime()});const t=await k();let n=r().runtime.getURL("/src/contribute/index.html");return e&&(n=`${n}?action=${e}`),_({url:n,index:t.index+1})}async function ue(){let{tabId:e,frameId:t=0,module:n,insert:a=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{const[s]=await r().tabs.executeScript(e,{frameId:t,runAt:"document_start",code:`typeof ${n}Module !== 'undefined'`});if(!s&&a&&await r().tabs.executeScript(e,{frameId:t,runAt:"document_start",file:`/src/${n}/script.js`}),s||a)return!0}catch(e){}return!1}async function de(){let{activeTab:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[];if(e){const e=await k();e&&t.push(e)}else t.push(...await r().tabs.query({url:["http://*/*","https://*/*"],windowType:"normal"}));for(const e of t)r().tabs.executeScript(e.id,{allFrames:!0,runAt:"document_start",file:"/src/base/script.js"})}function me(e){return new Promise(((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)}))}let he;function fe(){return he||(he=function(e,t){const n=(!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(e){var t=function(){return indexedDB.databases().finally(e)};r=setInterval(t,100),t()})).finally((function(){return clearInterval(r)})):Promise.resolve()).then((()=>{const e=indexedDB.open("keyval-store");return e.onupgradeneeded=()=>e.result.createObjectStore(t),me(e)}));var r;return(e,r)=>n.then((n=>r(n.transaction(t,e).objectStore(t))))}(0,"keyval")),he}function pe(e,t=fe()){return t("readonly",(t=>me(t.get(e))))}function ve(e,t,n=fe()){return n("readwrite",(n=>(n.put(t,e),me(n.transaction))))}function Ae(e,t=fe()){return t("readwrite",(t=>(t.delete(e),me(t.transaction))))}const we=new p({concurrency:1}),be=new p({concurrency:1}),ye={};function xe(e){return{metadataKey:`metadata_${e}`,dataKey:`data_${e}`}}async function _e(){let{storageId:e,metadata:t=!1,data:n=!1,area:r="local"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{metadataKey:a,dataKey:s}=xe(e);return t&&({[a]:{value:t}={}}=await A.default.get(a)),n&&("local"===r?({[s]:{value:n}={}}=await A.default.get(s)):"indexeddb"===r?({value:n}=await pe(s)):"memory"===r&&({value:n}=ye[s])),{metadata:t,data:n}}async function Ie(){let{storageId:e,metadata:t=null,data:n=null,area:r="local"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{metadataKey:a,dataKey:s}=xe(e);null!==t&&await A.default.set({[a]:{value:t}}),null!==n&&("local"===r?await A.default.set({[s]:{value:n}}):"indexeddb"===r?await ve(s,{value:n}):"memory"===r&&(ye[s]={value:n}))}async function Ce(){let{storageId:e,metadata:t=!1,data:n=!1,area:r="local"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{metadataKey:a,dataKey:s}=xe(e);t&&await A.default.remove(a),n&&("local"===r?await A.default.remove(s):"indexeddb"===r?await Ae(s):"memory"===r&&delete ye[s])}async function Te(){let{storageId:e,registry:t=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{metadata:n}=await _e({storageId:e,metadata:!0});if(n){await Ce({storageId:e,data:!0,area:n.area});for(const e of n.alarms)await r().alarms.clear(e);await Ce({storageId:e,metadata:!0}),t&&(n.isTask&&await je({taskId:e}),await Pe({storageId:e}))}}async function ke(){let{storageId:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};await we.add((async function(){const{metadata:t}=await _e({storageId:e,metadata:!0});t&&t.receipts&&(t.receipts.received+=1,t.receipts.received<t.receipts.expected?await Ie({storageId:e,metadata:t}):await Te({storageId:e}))}))}async function Ee(){let{storageId:e,addTime:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};await be.add((async function(){const{storageRegistry:n}=await A.default.get("storageRegistry");n[e]={addTime:t},await A.default.set({storageRegistry:n})}))}async function Pe(){let{storageId:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};await be.add((async function(){const{storageRegistry:t}=await A.default.get("storageRegistry");delete t[e],await A.default.set({storageRegistry:t})}))}async function je(){let{taskId:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};await be.add((async function(){const{taskRegistry:t}=await A.default.get("taskRegistry"),n=t.tasks[e];if(n){const r=t.tabs[n.tabId];r&&r.taskId===e&&delete t.tabs[n.tabId]}delete t.tasks[e],await A.default.set({taskRegistry:t})}))}const Se={addStorageItem:async function(e){let{token:t="",receipts:n=null,expiryTime:a=0,area:s="local",isTask:i=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"indexeddb"!==s||["safari"].includes(w.W9)||(s="memory");const o=t||g(),c=Date.now(),l={area:s,addTime:c,receipts:n,alarms:[],isTask:i};if(a){const e=`delete-storage-item_${o}`;r().alarms.create(e,{delayInMinutes:a}),l.alarms.push(e)}return await Ee({storageId:o,addTime:c}),await Ie({storageId:o,metadata:l,data:e,area:s}),o},getStorageItem:async function(){let{storageId:e,saveReceipt:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{metadata:n}=await _e({storageId:e,metadata:!0});if(n){const{data:r}=await _e({storageId:e,data:!0,area:n.area});if(r)return t&&await ke({storageId:e}),r}},deleteStorageItem:Te,saveStorageItemReceipt:ke,addTaskRegistryItem:async function(){let{taskId:e,tabId:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};await be.add((async function(){const{taskRegistry:n}=await A.default.get("taskRegistry"),r=Date.now();n.lastTaskStart=r,n.tabs[t]={taskId:e},n.tasks[e]={tabId:t,addTime:r},await A.default.set({taskRegistry:n})}))},getTaskRegistryItem:async function(){let{taskId:e,tabId:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{taskRegistry:n}=await A.default.get("taskRegistry");if(t){const e=n.tabs[t];if(e)return{taskId:e.taskId,...n.tasks[e.taskId]}}else if(e){const t=n.tasks[e];if(t)return{taskId:e,...t}}},cleanupRegistry:async function(){await be.add((async function(){const{lastStorageCleanup:e}=await A.default.get("lastStorageCleanup");if(Date.now()-e>864e5){const{taskRegistry:e}=await A.default.get("taskRegistry");for(const[t,n]of Object.entries(e.tasks))if(Date.now()-n.addTime>36e5){const r=e.tabs[n.tabId];r&&r.taskId===t&&delete e.tabs[n.tabId],delete e.tasks[t]}await A.default.set({taskRegistry:e});const{storageRegistry:t}=await A.default.get("storageRegistry");for(const[e,n]of Object.entries(t))Date.now()-n.addTime>36e5&&(await Te({storageId:e,registry:!1}),delete t[e]);await A.default.set({storageRegistry:t,lastStorageCleanup:Date.now()})}}))}},Oe=new p({concurrency:1});function qe(e,t){r().webRequest.onBeforeSendHeaders.addListener((function(e){for(const n of e.requestHeaders)if("user-agent"===n.name.toLowerCase()){n.value=t;break}return{requestHeaders:e.requestHeaders}}),{urls:["http://*/*","https://*/*"],tabId:e},["blocking","requestHeaders"])}function Me(e){return"googleText"===e?e="google":"archiveOrgAll"===e?e="archiveOrg":"archiveIsAll"===e&&(e="archiveIs"),["gigablast"].includes(e)?{16:`src/assets/icons/engines/${e}-16.png`,32:`src/assets/icons/engines/${e}-32.png`}:{16:`src/assets/icons/engines/${e}.svg`}}function Re(e){let{id:t,title:n="",contexts:a,parent:s,type:i="normal",documentUrlPatterns:o,targetUrlPatterns:c,icons:l}=e;const g={id:t,title:n,contexts:a,documentUrlPatterns:o,parentId:s,type:i};c&&(g.targetUrlPatterns=c),l&&(g.icons=l),r().contextMenus.create(g,y)}async function Le(e,t){if("all"===e){const e=["audio","editable","frame","image","selection","video"];await P()||e.push("page"),Re({id:"openCurrentDoc_1",title:b("menuItemTitle_openCurrentDoc"),contexts:e,documentUrlPatterns:Object.values(re).map((e=>e.map((e=>`*://${e}/*`)))).flat()})}Re({id:"openCurrentDoc_2",title:b("menuItemTitle_openCurrentDoc"),contexts:["link"],documentUrlPatterns:t,targetUrlPatterns:Object.values(ae).map((e=>e.map((e=>`*://${e}/*`)))).flat()})}async function $e(){const e=await A.default.get(ee),t=await ie(e),n=[];"all"===e.showInContextMenu?(n.push("audio","editable","frame","image","link","selection","video"),await P()||n.push("page")):n.push("link");const r=["http://*/*","https://*/*"];let a=!1;if("firefox"===w.W9&&("link"===e.showInContextMenu&&r.push("file:///*"),a=e.showEngineIcons),1!==t.length){if(t.length>1){if("samsung"!==w.W9){const t=e.searchAllEnginesContextMenu;if("main"===t)return void Re({id:"search_allEngines",title:b("mainMenuItemTitle_allEngines"),contexts:n,documentUrlPatterns:r});"sub"===t&&(e.openCurrentDocContextMenu&&(await Le(e.showInContextMenu,r),Re({id:"sep-1",contexts:n,type:"separator",documentUrlPatterns:r})),Re({id:"search_allEngines",title:b("menuItemTitle_allEngines"),contexts:n,documentUrlPatterns:r,icons:a&&Me("allEngines")}),Re({id:"sep-2",contexts:n,type:"separator",documentUrlPatterns:r}))}else e.openCurrentDocContextMenu&&await Le(e.showInContextMenu,r);t.forEach((function(e){Re({id:`search_${e}`,title:b(`menuItemTitle_${e}`),contexts:n,documentUrlPatterns:r,icons:a&&Me(e)})}))}}else{const e=t[0];Re({id:`search_${e}`,title:b("mainMenuItemTitle_engine",b(`menuItemTitle_${e}`)),contexts:n,documentUrlPatterns:r})}}async function Ne(e){const t={sessionOrigin:"",sessionType:"search",searchMode:"",sourceTabId:-1,sourceTabIndex:-1,sourceFrameId:-1,engineGroup:"",engines:[],options:{}};if(t.options=await A.default.get(ee),e.options&&(Object.assign(t.options,e.options),delete e.options),e.engine){if("allEngines"===e.engine){const e=await ie(t.options);t.engineGroup="allEngines",t.engines=e}else t.engines.push(e.engine);delete e.engine}return Object.assign(t,e),t.searchMode||(t.searchMode="action"===t.sessionOrigin?t.options.searchModeAction:t.options.searchModeContextMenu),t}async function Ue(e,t){["chrome","opera"].includes(w.W9)&&async function(){if(/ opr\//i.test(navigator.userAgent)){const{lastEngineAccessCheck:e}=await A.default.get("lastEngineAccessCheck");if(Date.now()-e>6048e5){await A.default.set({lastEngineAccessCheck:Date.now()});const e="https://www.google.com/generate_204";await new Promise((t=>{let n=!1;function a(){return n=!0,s(),{cancel:!0}}const s=function(){window.clearTimeout(i),r().webRequest.onBeforeRequest.removeListener(a),t(n)},i=window.setTimeout(s,3e3);r().webRequest.onBeforeRequest.addListener(a,{urls:[e],types:["xmlhttprequest"]},["blocking"]),fetch(e).catch((e=>null))}))||await ce({messageId:"error_noSearchEngineAccess"})}}}(),Array.isArray(t)||(t=[t]);const n=await r().tabs.get(e.sourceTabId);e.sourceTabIndex=n.index;let a=!0;for(const n of t)await De(e,n,a),a=!1}async function De(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!le(t.docUrl))return void await ce({messageId:"error_invalidPageUrl"});let a,s=n;if(w.pL&&n){let{useCount:t}=await A.default.get("useCount");t+=1,await A.default.set({useCount:t}),[10,30].includes(t)&&(a=(await ge("search")).id,e.sourceTabIndex+=1,s=!1)}s=!e.options.tabInBackgound&&s;const i=await oe(e.engines),o=i.filter((e=>e.sendsReceipt));let c;o.length&&(c=await Se.addStorageItem(t,{receipts:{expected:o.length,received:0},expiryTime:10,area:"indexeddb"}));for(const n of i)e.sourceTabIndex+=1,await We(e,n,t,c,s),s=!1;await P()&&a&&await r().tabs.update(a,{active:!0})}async function We(e,t,n,a,s){let i;t.sendsReceipt&&(i=await Se.addStorageItem({session:e,search:t,docId:a},{receipts:{expected:1,received:0},expiryTime:10,isTask:!0}));const o=g(),c=(await _({token:o,index:e.sourceTabIndex,active:s})).id;t.sendsReceipt&&await Se.addTaskRegistryItem({taskId:i,tabId:c});const l=await async function(e,t,n,r){const a=t.engine;let s=te[a].target;t.isTaskId&&(s=s.replace("{id}",r));let i=n.docUrl;if(["archiveOrg","archiveOrgAll"].includes(t.engine)&&(i=function(e){const t=new URL(e);return t.hash&&(t.hash=""),t.toString()}(i)),["archiveOrg","archiveOrgAll","archiveIs","archiveIsAll","memento"].includes(a)||(i=encodeURIComponent(i)),"memento"===a){const e=new Date;e.setUTCMinutes(e.getUTCMinutes()-1),s=s.replace("{date}",e.toISOString().split(".")[0].replace(/[-T:]/g,""))}return s=s.replace(/{url}/g,i),s}(0,t,n,i);await async function(e,t,n,a){let s;const i=await async function(e){if(await P()){if("firefox"===w.W9&&["google","googleText"].includes(e))return"Mozilla/5.0 (Linux; Android 11; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Mobile Safari/537.36";if(["yandex","qihoo","baidu","yahooJp","bing","mailru","yahoo"].includes(e))return"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"}}(a);if(i)if("samsung"===w.W9){function e(e){t(),qe(e.tabId,i)}s=g();const t=function(){window.clearTimeout(n),r().webRequest.onBeforeRequest.removeListener(e)},n=window.setTimeout(t,1e4);r().webRequest.onBeforeRequest.addListener(e,{urls:[I(s)],types:["main_frame"]},["blocking"])}else qe(e,i);s&&await Se.addStorageItem({tabUrl:t,keepHistory:!1},{receipts:{expected:1,received:0},expiryTime:1,token:s}),await Se.addStorageItem({tabUrl:s?I(s):t,keepHistory:!1},{receipts:{expected:1,received:0},expiryTime:1,token:n}),"safari"===w.W9?r().runtime.sendMessage({id:"setTabLocation",token:n}).catch((e=>null)):r().tabs.sendMessage(e,{id:"setTabLocation",token:n},{frameId:0}).catch((e=>null))}(c,l,o,t.engine)}async function Be(){let{linkUrl:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e){let t;for(const[n,r]of Object.entries(se)){const a=e.match(r);if(a){if("google"===n){const n=new URL(e).searchParams.get("q");n&&(t=n.replace(/^cache.*?(https?:\/\/.*)$/,"$1").trim())}else t=a[1].trim();break}}if(le(t)){const e=await k();await _({url:t,index:e.index+1})}else await ce({messageId:"error_currentDocUrlNotFound"})}else{const e=await k();await ue({tabId:e.id,module:"tools",insert:!0})?await C("openCurrentDoc()",e.id):await ce({messageId:"error_scriptsNotAllowed"})}}async function Fe(e,t){Ue(e,{docUrl:t})}async function Ve(e){"samsung"===w.W9&&e.id!==r().tabs.TAB_ID_NONE&&(e=await r().tabs.get(e.id));const t=await Ne({sessionOrigin:"action",sourceTabId:e.id,sourceTabIndex:e.index});if("url"===t.searchMode)return void await ce({messageId:await j()?"error_invalidSearchModeMobile_url":"error_invalidSearchMode_url"});const n=await ie(t.options);n.length?("main"===t.options.searchAllEnginesAction&&n.length>1?(t.engineGroup="allEngines",t.engines=n):t.engines.push(n[0]),Fe(t,e.url)):await ce({messageId:"error_allEnginesDisabled"})}async function ze(){await r().contextMenus.removeAll();const{showInContextMenu:e}=await A.default.get("showInContextMenu");e&&(["chrome","edge","opera"].includes(w.W9)?await A.default.set({setContextMenuEvent:Date.now()}):await $e())}async function He(){const e=await A.default.get(["engines","disabledEngines","searchAllEnginesAction"]),t=await ie(e);return 1===t.length?(r().browserAction.setTitle({title:b("actionTitle_engine",b(`engineName_${t[0]}`))}),void r().browserAction.setPopup({popup:""})):"main"===e.searchAllEnginesAction&&t.length>1?(r().browserAction.setTitle({title:b("actionTitle_allEngines")}),void r().browserAction.setPopup({popup:""})):(r().browserAction.setTitle({title:b("extensionName")}),void(0===t.length?r().browserAction.setPopup({popup:""}):r().browserAction.setPopup({popup:"/src/action/index.html"})))}async function Je(e){await async function(e){const t=await A.default.get(["engines","disabledEngines","searchAllEnginesAction"]),n=await ie(t),a=r().pageAction.onClicked.hasListener(Ve);return 1===n.length?(a||r().pageAction.onClicked.addListener(Ve),r().pageAction.setTitle({tabId:e,title:b("actionTitle_engine",b(`engineName_${n[0]}`))}),void r().pageAction.setPopup({tabId:e,popup:""})):"main"===t.searchAllEnginesAction&&n.length>1?(a||r().pageAction.onClicked.addListener(Ve),r().pageAction.setTitle({tabId:e,title:b("actionTitle_allEngines")}),void r().pageAction.setPopup({tabId:e,popup:""})):(r().pageAction.setTitle({tabId:e,title:b("extensionName")}),void(0===n.length?(a||r().pageAction.onClicked.addListener(Ve),r().pageAction.setPopup({tabId:e,popup:""})):(a&&r().pageAction.onClicked.removeListener(Ve),r().pageAction.setPopup({tabId:e,popup:"/src/action/index.html"}))))}(e),await r().pageAction.show(e)}async function Ke(e){ne.includes(e.statusCode)&&await Je(e.tabId)}async function Ze(e){await Je(e.tabId)}async function Ge(){const{showPageAction:e}=await A.default.get("showPageAction"),t=r().webRequest.onCompleted.hasListener(Ke);if(e){if(!t){const e={types:["main_frame"],urls:["http://*/*","https://*/*"]};r().webRequest.onCompleted.addListener(Ke,e),r().webRequest.onErrorOccurred.addListener(Ze,e)}}else t&&(r().webRequest.onCompleted.removeListener(Ke),r().webRequest.onErrorOccurred.removeListener(Ze))}async function Qe(){const e=[He];await async function(){if(await P()){if("samsung"===w.W9)return!0}else if(r().contextMenus)return!0;return!1}()&&e.push(ze),"firefox"!==w.W9||await P()||e.push(Ge),await Oe.addAll(e)}r().contextMenus&&r().contextMenus.onClicked.addListener((async function(e,t){"samsung"===w.W9&&t.id!==r().tabs.TAB_ID_NONE&&(t=await r().tabs.get(t.id));const[n,a]=e.menuItemId.split("_");if("openCurrentDoc"===n)return void await Be({linkUrl:e.linkUrl});const s={sessionOrigin:"context",sessionType:n,sourceTabId:t.id,sourceTabIndex:t.index,sourceFrameId:void 0!==e.frameId?e.frameId:0};"search"===n&&(s.engine=a),Ue(await Ne(s),{docUrl:e.linkUrl||e.pageUrl})})),r().browserAction.onClicked.addListener(Ve),r().runtime.onMessage.addListener((function(e,t,n){const a=async function(e,t){if(t.url!==document.URL)if("samsung"===w.W9&&t.tab&&t.tab.id!==r().tabs.TAB_ID_NONE&&(t.tab=await r().tabs.get(t.tab.id)),"actionPopupSubmit"===e.id&&async function(e,t){const n=await k();Fe(await Ne({sessionOrigin:"action",sourceTabId:n.id,sourceTabIndex:n.index,engine:e}),t||n.url)}(e.engine,e.docUrl),"openCurrentDoc"===e.id)Be();else if("notification"===e.id)ce({message:e.message,messageId:e.messageId,title:e.title,type:e.type});else{if("getPlatform"===e.id)return E({fallback:!1});if("storageRequest"===e.id){const n=await Se.getStorageItem({storageId:e.storageId,saveReceipt:e.saveReceipt});if(n){if(e.asyncResponse)return Promise.resolve(n);r().tabs.sendMessage(t.tab.id,{id:"storageResponse",storageItem:n},{frameId:t.frameId})}}else if("storageReceipt"===e.id)for(const t of e.storageIds)await Se.saveStorageItemReceipt({storageId:t});else if("taskRequest"===e.id){const e=await Se.getTaskRegistryItem({tabId:t.tab.id});if(e&&Date.now()-e.addTime<6e5){const n=await Se.getStorageItem({storageId:e.taskId});n&&n.search.isExec&&async function(e,t,n){await C(`var taskId = '${n}';`,e),await T("/src/commons-engine/script.js",e),await T(`/src/engines/${t}/script.js`,e)}(t.tab.id,n.search.engine,e.taskId)}}else"optionChange"===e.id?await async function(){await Qe()}():"createTab"===e.id&&await _({url:e.url,index:t.tab.index+1})}}(e,t);return"safari"===w.W9?(a.then((function(e){void 0===e&&(e=null),n(e)})),!0):a})),r().storage.onChanged.addListener((async function(e,t){"local"===t&&await(0,A.isStorageReady)()&&e.setContextMenuEvent&&await Oe.add($e)})),r().alarms.onAlarm.addListener((async function(e){let{name:t}=e;if(t.startsWith("delete-storage-item")){const[e,n]=t.split("_");await Se.deleteStorageItem({storageId:n})}})),r().runtime.onInstalled.addListener((async function(e){["install","update"].includes(e.reason)&&["chrome","edge","opera","samsung"].includes(w.W9)&&await de()})),r().runtime.onStartup.addListener((async function(){["samsung"].includes(w.W9)&&await de({activeTab:!0})})),async function(){await(0,A.isStorageReady)()||(await(0,v.migrateLegacyStorage)(),await(0,v.initStorage)()),await Qe(),await Se.cleanupRegistry()}()})()})();

@chstdu chstdu changed the title Broken in incognito Mode in Chrome Broken in incognito mode in Chrome OS Dec 12, 2022
@chstdu
Copy link
Author

chstdu commented Dec 12, 2022

It is working fine in incognito mode in Chrome on Windows 10. I will try again next weekend when I am using ChromeOS again.

@dessant
Copy link
Owner

dessant commented Dec 17, 2022

Does it also fail to work if you're not in incognito on ChromeOS?

@chstdu
Copy link
Author

chstdu commented Dec 17, 2022

Thank you for your response! It seems to work fine if I am not in incognito mode on ChromeOS. Anything else that I could test or help?

@dessant
Copy link
Owner

dessant commented Dec 19, 2022

If you have access to a second Chromebook, please also check there to confirm that this is not just an issue with your device. I'd like to debug the issue myself, but there does not seem to be an easy way to run ChromeOS Flex in a virtual machine, though people have posted some workarounds that I'll need to test.

@chstdu
Copy link
Author

chstdu commented Dec 27, 2022

Unfortunately, I don't have access to a second Chromebook but I now installed the extension also on a second user account on the same Chromebook. The behavior in the incognito mode is the same:

  • Clicking on an entry in the right-click menu does nothing.
  • Clicking on the extension icon next to the address bar opens an overlay but does not show any archives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants