medialab / artoo

artoo.js - the client-side scraping companion.
http://medialab.github.io/artoo/
MIT License
1.1k stars 93 forks source link

Userscript Edition #263

Open ghost opened 7 years ago

ghost commented 7 years ago

Artoo looks great, though for some sites the Security policy simply kills it. One way around this that doesn't require Chrome, and might be more cross-browser, would be a "userscript edition", that could run in e.g. Greasemonkey and receive a window object to work with (in GM, this would be unsafeWindow).

This would also let you use userscripting frameworks' menu commands to make menu-shortcuts for scraping, instead of bookmarklets; this might let people disable the shortcuts toolbar while still having artoo just 3 clicks away.

What would be needed to change artoo into a format that could be run in a userscript sandbox?

Yomguithereal commented 7 years ago

Hello @cathalgarvey. This would be a nice idea indeed. I don't think there is much to change in the library's code to make this happen. One would just need to code the required bridge between artoo and the userscripts. Unfortunately I am a beotian in those matters so if you want to submit a PR, I'll gladly review it.

Krazybug commented 5 years ago

Hello, something new on this topic ?

Userscript integration would allow using it on FF and will solve all CORS issues. It's really a nice feature.