chromix
chromix copied to clipboard
Feature request: downloads and window permissions
I'm trying to download a few scientific papers with chromix but can't get the raw function to use chrome.downloads.download [since downloads isn't in the chromi manifest permissions]
chromix raw chrome.downloads.download '{url: http://www.bioscirep.org/bsr/034/e120/034e120.pdf, filename: abcd}'
returns
json parse error: {url: "http://www.bioscirep.org/bsr/034/e120/034e120.pdf", filename: "abcd"}
Chromi 1746990595 error could not find function chrome.downloads.download
Wrapping both/either URL/title in double/single quotes makes no difference to the JSON parsing result - I'm assuming this would go away with sufficient permissions.
The code should definitely work as above, it's functioning within a browser extension I wrote. Would you consider adding permissions downloads and windows* to the manifest? I'd download the repo and run it locally as a dev mode extension but I'd assume chromix-server wouldn't connect then... (?)
* I'd like windows in permissions as at present when chromix brings a tab into focus, there can be other windows in the way of it. I've not done so before but I'd think it should be trivial to select the window with the focused tab in this event with chrome.windows.getCurrent
There shouldn't be a problem running the chromi extension as an unpacked extension. It will just connect to the TCP port on localhost, exactly the same as the Chrome Store version. Head on over here:
- https://github.com/smblott-github/chromi
Just don't have the Chrome Store version and the unpacked version running at the same time, of course.
If you submit a PR over there, I'll look at it.
@lmmx Did you ever figure out if getting window permissions is enough to do what you wanted?
@smblott-github I'm not sure I understand why there is mention of chromi in your comment. Doesn't chromix-too supercede that extension?