chromix icon indicating copy to clipboard operation
chromix copied to clipboard

Feature request: downloads and window permissions

Open lmmx opened this issue 11 years ago • 3 comments

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

lmmx avatar Sep 23 '14 00:09 lmmx

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.

smblott-github avatar Sep 23 '14 05:09 smblott-github

@lmmx Did you ever figure out if getting window permissions is enough to do what you wanted?

colonelpanic8 avatar May 08 '17 06:05 colonelpanic8

@smblott-github I'm not sure I understand why there is mention of chromi in your comment. Doesn't chromix-too supercede that extension?

colonelpanic8 avatar May 08 '17 06:05 colonelpanic8