luciopaiva / witchcraft

Inject Javascript and CSS right from your file system. Think GreaseMonkey for more advanced users.
https://luciopaiva.com/witchcraft
MIT License
254 stars 18 forks source link

Quick question: Is it possible to match chrome extensions (i.e. options pages or the LastPass vault)? #32

Closed JRasmusBm closed 3 years ago

JRasmusBm commented 3 years ago

First of all, I want to thank you for an amazing library that has totally revolutionized how I use the web! :smile:

My main use case for witchcraft is making buttons and links accessible so that I can access them using vimium. If it is not possible, it is okay, but I would really like to be able to match the settings pages on some of my extensions so I don't have to use my mouse on those pages.

I'm thinking for example of files located at: chrome-extension://<hostname>/index.html

Thank you, regardless of if it is possible! And once again thanks for the awesome library! :smile:

luciopaiva commented 3 years ago

First of all, I want to thank you for an amazing library that has totally revolutionized how I use the web! 😄

Very nice to hear that! And sorry I took so long to answer. Witchcraft would benefit from having other people answering open issues, so we don't have to wait for me to have the time to do it. And most issues are really good questions (like yours), tbh.

My main use case for witchcraft is making buttons and links accessible so that I can access them using vimium.

That's a very cool extension, didn't know about it.

I would really like to be able to match the settings pages on some of my extensions so I don't have to use my mouse on those pages. I'm thinking for example of files located at: chrome-extension://<hostname>/index.html

I never thought about injecting on other extensions' pages; that's a very clever use case. Unfortunately, from what I could test here, Chrome does not load other extensions when navigating some extension's pages. I tried that by adding a _global.js script to my folder (as instructed in the "Global scripts" section in the docs) and making it print something to the console, then tried accessing the pages of some extensions like The Great Suspender, but nothing was printed to the console.

The Chrome extension docs mention that permitted schemes are http, https, file, and ftp, so chrome and chrome-extension are not covered (as also pointed out by this SO answer).

I even tried enabling the flag mentioned by this other SO answer, but it didn't work (it only applies to the chrome scheme, not chrome-extension).

So I guess we're out of luck here; it's not a Witchcraft limitation, so there's nothing we can do 😞

Well, you could get the source code for the extensions you're using and change them to be usable via vimium. I guess you're out of luck there too, since you mentioned LastPass and it's not open source.

JRasmusBm commented 3 years ago

And sorry I took so long to answer.

I can only say thank you for answering, and in such a thoughtful way. OSS is a lot of work, and you have given me so much value for free! 🙏

Witchcraft would benefit from having other people answering open issues, so we don't have to wait for me to have the time to do it.

Wish I had the time to allocate to help, am currently on parental leave with two small kids, and so even when I get back to work my free time will be very limited. Thank you for all the time you invest and good luck with finding contributors!

That's a very cool extension, didn't know about it.

Yes, on pages with semantic HTML, it really improves life. That's why I use witchcraft on pages that don't to make the HTML semantic.

So I guess we're out of luck here; it's not a Witchcraft limitation, so there's nothing we can do 😞

Thank you so much for the effort and for your thoughtful reply. We need more of this in OSS! 😄