Quizlet-Bypass icon indicating copy to clipboard operation
Quizlet-Bypass copied to clipboard

Issue with working on quizlet (opera)

Open schrold opened this issue 6 months ago • 1 comments

Browser Version

Opera GX

Exension Version

1.5.4

Actual behaviour

The solution page (on quizlet) constantly reloads on its own, switching between the normal paywall and another box that says "This content will be unlocked in no time. All you have to do is [reload the page]"

https://github.com/rospino74/Quizlet-Bypass/assets/42776870/465573b1-0f02-4301-9a86-35d4a891f0d0

This error comes up in the extention (just copy pasted): %cError while fetching the page: %o color: #F5AB80 Error Context assets/src/backend/sw-85c91ec5.js Stack Trace assets/src/backend/sw-85c91ec5.js:3 (anonymous function) Code async function g(e,o="https://quizlet.com"){e.split("; ").forEach(async s=>{const[a,t]=s.split("=");await chrome.cookies.set({url:o,name:a,value:t})})}function f(e="https://quizlet.com"){chrome.cookies.getAll({url:e},o=>{o.forEach(async s=>{await chrome.cookies.remove({url:e,name:s.name})})})}async function k(e,o,s,a={},t=!0){const c={...{"Upgrade-Insecure-Requests":"1","Cache-Control":"max-age=0"},...a};console.log("makeBackgroundWebRequest",e,o,s,c);const n=await fetch(e,{credentials:t?"include":"omit",headers:c,method:o,body:s,mode:"cors"});if(console.log(n),n.ok)return n;throw new Error(n.statusText)}async function l(){let e;return e=await chrome.storage.sync.get("stats"),e.stats??{}}async function b(e){await chrome.storage.sync.set({stats:e})}async function p(e){const o=await l();o[e]=(o[e]??0)+1,await b(o)}(()=>{let e=["font-weight: bold","font-size: 32px","color: white"].join(";");e+="; text-shadow: ",[0,40,60,100,170,230,270,360].forEach((o,s,a)=>{const t=s+1;e+=${1.5*t}px ${1.2*t}px 0px hsl(${o}, 70%, 60%)${t<a.length?", ":";"}}),console.log(`%cQuizlet Bypass %cv%s

https://github.com/rospino74/Quizlet-Bypass`,e,"color: gray; font-style: italic;","1.5.4")})();chrome.runtime.onMessage.addListener((e,o,s)=>{console.info(chrome.i18n.getMessage("messageFromContentScript"),e);const{action:a,value:t}=e,{tab:r}=o;switch(a){case"copyCookies":{console.info(chrome.i18n.getMessage("cookiesReceived"),t);const c=r?.url?new URL(r.url).origin:void 0;g(t,c);break}case"clearCookies":{console.info(chrome.i18n.getMessage("cookiesCleared"));const c=r?.url?new URL(r.url).origin:void 0;f(c);break}case"refresh":{if(console.info(chrome.i18n.getMessage("debugRefreshRequested")),r?.id){const{id:c,url:n}=r;chrome.tabs.reload(c).catch(()=>{chrome.tabs.update(c,{url:n})})}break}case"incrementStats":{console.info("Increment stats received"),p(t);break}case"getStats":{console.info("Get stats received"),l().then(c=>{s(c[t])});break}case"makeWebRequest":{console.info(chrome.i18n.getMessage("debugWebRequestResponse"),t);const{method:c,url:n,body:u,headers:h,sendCredentials:m}=t;k(n,c,u,h,m).then(i=>{i.text().then(d=>{s({text:d,error:!1})})}).catch(i=>{console.error(chrome.i18n.getMessage("fetchError"),"color: #F5AB80",i),s({text:i,error:!0})});break}}return!0});chrome.tabs.onUpdated.addListener((e,o,s)=>{const a=o.url??s.url??"quizlet.com",t=chrome.action;a.includes("quizlet.com")?t.enable(e):t.disable(e)});

Reproduction steps

  1. Installed the extension (as I have done on my laptop, where it works fine)
  2. Opened Quizlet to see a textbook solution
  3. The solution page constantly reloads on its own, switching between the normal paywall and another box that says "This content will be unlocked in no time. All you have to do is [reload the page]"

Expected behaviour

I expected the solution to load like normal

schrold avatar Jan 04 '24 12:01 schrold