-
Notifications
You must be signed in to change notification settings - Fork 1
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
Does not work on local web pages in htmlz format #8
Comments
I could reproduce your issue (not working on files saved with SingleFileZ) for the first time after I installed SingleFileZ. After restarting the browser and opening a *.zip.html page copy-on-select somehow started working even on that previously saved page. Will try again tomorrow with a fresh browser profile - if you have some more detailed instructions on how to reproduce the issue, pls let me know. |
I open any file saved in SingleFileZ and the addon does not work. For example - this file: |
Thanks for the sample - I can reproduce the issue now. Will have a closer look tomorrow. |
The good news: There is hope. The bad news: It's a timing related issue - if I sleep 50ms before adding the main event listener things seem to work. Not beautiful. Since you are on FF nightly and a GitHub user, would you mind testing an unsigned extension that provides this fix? I have pushed the tentative changes to branch "8-does-not-work-on-local-web-pages-in-htmlz-format". If you clone that branch you should be able to use that clone as temporary extension. Alternatively, I can provide an unsigned xpi. If you need instructions on all that, just let me know. If that's all too much, also fine - only having such a hack asks for more tests, I think. Thanks. |
Thank you very much! |
Now that was quick - thanks as well for testing! Will need some time to finalize the changes and test some more - stay tuned... |
Found the root cause of the issue, nothing funny or strange about this. The body of the document changes after it has been loaded, thus loosing the initially attached event listener. This isn't particularly difficult to fix, I just haven't had this on my radar before. In any case this will require a different/better fix. |
But some addons are not affected by this problem. |
Most likely because they did this thing correctly right from the start :-) After all, I started this fork because I needed this functionality myself and found the original extension a bit too limited. Now I keep learning more and more JavaScript with every bug a user comes across ... So if you find any such issues in future, please do file them - very much appreciated! I hope to have a final version fixing this issue ready by end of this weekend. |
Super! I'll be happy to test that version. |
Just released version 2.5. Please give it a try, when all is good I'll upload it to addons.mozilla.org. |
2.5 works great. Brilliant! Thank you very much!
Or do I need to remove some additional lines? |
Thanks for testing, will upload to AMO soon.
You should only remove these three lines:
but leave the others in - the This restriction, by the way, comes from issue #1. The problem is that on Closing this issue - if you have more questions, feel free to continue in the closed issue or open another one ... |
Hi!
The addon does not work on local web pages saved with SingleFile (SingleFileZ).
Could you add the ability to work on saved local files?
The text was updated successfully, but these errors were encountered: