Open wjsw1781 opened 2 months ago
you can mv the img2base64 from backgroud to contentjs or mv as much logic as possible from backgroud to contentjs! it is big job, so the dicision is on you! i want to say 存储一个页面资源的过程html css font img,直觉上就应该在contenjs,而不是在backgroundjs中! 遍历dom, hook iframe ,download img ,都应当放在contentjs中运行 background只关注事件!
I cannot reproduce a successful fetch
of the resource you mentioned in Chrome with the Dev Tools. See below. Note however that what you described is already implemented in SingleFile and works fine in Firefox.
Do you mean the firefox version of SingleFile? Can you give me an address?
i find it is ok in firefox! why? if it in edge or chrome ,it could not save the anti-img! could you give me a issue about it ? i want to study it ,thank you !!!!
i guess someone have talked about it , but i can not find those talkings, i am chinese , i could not search it good enough. and i really want to know how firefox can bypass the rule of anti-img! does it use fetch in context of contentjs? or use other way? i really want to know !
It's painful to debug but it looks like it's related to the cache.
Describe the bug
i find the website save is ok ,but the img can not save,because the web open the Anti-theft rule, i know you get the img binary in background.js ,it will be error, could you use fetch in contentjs ? it will work! the url is https://weibo.com/1699432410/OwmaceM4N
you see,it is 403! but if you run fetch() in contentjs context,it will be fine!
the reason is reffer can not be set in popup,backgroud, slider,or other context, but contentjs can auto use the reffer in header,then bypass the rule!