inox-patchset
inox-patchset copied to clipboard
[Enhancement] install extensions from Google WebStore
Hello! Would you add some extension to simplier installation extensions from Google WebStore? Would be nice feature! Thanks!
I've whipped up this simple script to download an extension from the store link and open it with inox, then you can just drag and drop the .crx from inox.
https://github.com/SethDusek/extension-downloader
Usage: python downloader.py YOURLINKHERE
The link is a store link such as https://chrome.google.com/webstore/detail/scriptsafe/oiigbmnaadbkfbmpbfijlflahbdbdgdf
doesn't seem to work for postman, it tells me I can only install it from the webstore
Hello @SethDusek , it doesn't work on my end.
@hasufell Once it is downloaded you have to drag and drop the extension.
Once it is downloaded you have to drag and drop the extension.
Obviously. And it doesn't work.
What error do you get? When I wrote that a few months back I tested it out on both stock chromium and inox (on arch)
What error do you get?
What I already said: it tells me I can only install it from the webstore
Huh. Okay, I'll see what I can do
@hasufell Seems to be working for me on latest chromium. http://i.shibe.ml/QmRLtdABPCDRYr9Jn6NHTWwa5j5jBYNHieDj6nzc2GG7bA.webm
I can't test right now on inox as I don't have it built, but I don't see why inox patches would make any difference.
I can't test right now on inox as I don't have it built, but I don't see why inox patches would make any difference.
I don't see how testing it on chromium is relevant here. Please test it on inox. It doesn't help to make assumptions.
@MrAmnesiac I've done a little bit of digging into your issue, and I believe you are using the wrong link. For example you are using https://clients2.google.com/service/update2/crx?response=redirect&prodversion=48.0&x=id%3Dapmlngnhgbnjpajelfkmabhkfapgnoai%26installsource%3Dondemand%26uc
when instead you should just be passing the store link to the downloader, which in this case would be https://chrome.google.com/webstore/detail/cloud-to-butt-plus/apmlngnhgbnjpajelfkmabhkfapgnoai
@hasufell I got somebody on IRC to test it on arch with the inox-bin package. He says it is working, so I honestly don't know whats wrong here
edit: He also sent a video https://curl.io/get/vewx5hlf/7f337b7733f50adaa89a514e0462dd9453cdf902
I've been trying to install the Signal webapp, using the script and manually editing the URL, but the installation fails, telling me that "this element can only be installed from the Web Store", even when drag-dropping in chrome://extensions.
Is it possible to install Signal in Inox?
@s0r00t Why are you manually editing the URL, why not just pass it as an argument to the downloader?
Windows version (had to use chromium "download" workaround, otherwise extension won't open/drag)
@aolko why is the source code not available?
@SethDusek it will be a tad later
added source
@SethDusek because that's exactly what the script does.
What I meant is that I tried downloading it through your script, then through manual editing of the URL
Hello I'm just repeating what all others are waiting for eagerly... Pls, Pls... Would you add some extension to simplier installation extensions from Google WebStore? this would help us use the ungoogled chrome more extensively & with greater privacy... Thanks!
Hello developer !!
I'm just here for a quick reply..
WHAT IS THE SOLUTION TO THIS PROBLEM?
when I've downloaded the .py extension downloader & drag-n-dropped to
chrome://extensions/
it doesnot seem to work, just the errors shows:
Failed to load extension from: [PATH] Manifest file is missing or unreadable.
I'm sorry for not being active in this issue. I will look into this the next days.
I wrote a small "Extension unpacker" which downloads and unpacks extensions from WebStore to make a offline install possible, take a look here: https://github.com/gcarq/inoxunpack
with this you should be able to bypass the WebStore constraints.
Feel free to open PRs.
Would it be theoretically possible to unpack the extension directly to the profile directory of the browser? I imagine there is some kind of database that stores the installed extensions and their settings, which could be edited. This way installations and updates of extensions could be fully automated.
AFAIK Chrome explicitly prevents anything external from touching its extensions, to prevent malware (remember the changed homepage and a browser bar or two you didn't ask for while installing that audio converter a minute ago? That's primarily why :P). Even common antivirus software, generally rather invasive, can't install addons fully automatically, and Chrome prompts user on the next start whenever to install something or not.
How does it prevent that? There must be a workaround :)
There's a mechanism in Debian's Chromium that allows for system-installed extensions. I think it is a part of the Chromium code. It should be easy to modify to allow the mechanism to work relative to the profile directory I suppose. But this won't work with extensions that aren't installed this way.
AFAIK, most files in the profile directory are JSON or SQLite files. It shouldn't be too hard to modify it if you want to do that.
I think a better solution is to have an extension that takes care of this; i.e. notify the users and perform the update (if that is simple enough to do). Update checking and notifications should be possible with the current Chrome APIs.
@Eloston Do you have a link to the Debian's Chromium project where the extensions are included?
FYI it creates a new entries in ~/.config/inox/<UserProfile>/Preferences
if a unpacked extension is installed (ublock origin in this case), but there are a lot of additional properties which aren't provided by the manifest.json
"<some-id>": {
"active_permissions": {
"api": [
"contextMenus",
"privacy",
"storage",
"tabs",
"unlimitedStorage",
"webNavigation",
"webRequest",
"webRequestBlocking"
],
"explicit_host": [
"http://*/*",
"https://*/*"
],
"manifest_permissions": [],
"scriptable_host": [
"http://*/*",
"https://*/*"
]
},
"commands": {},
"content_settings": [],
"creation_flags": 38,
"events": [],
"extension_can_script_all_urls": true,
"from_bookmark": false,
"from_webstore": false,
"granted_permissions": {
"api": [
"contextMenus",
"privacy",
"storage",
"tabs",
"unlimitedStorage",
"webNavigation",
"webRequest",
"webRequestBlocking"
],
"explicit_host": [
"http://*/*",
"https://*/*"
],
"manifest_permissions": [],
"scriptable_host": [
"http://*/*",
"https://*/*"
]
},
"incognito_content_settings": [],
"incognito_preferences": {},
"initial_keybindings_set": true,
"install_time": "13131476020325255",
"location": 4,
"never_activated_since_loaded": true,
"newAllowFileAccess": true,
"path": "/home/test/.inoxunpack/cjpalhdlnbpafiamejdnhcphjbkeiagm",
"preferences": {
"enable_a_ping": false,
"net.network_prediction_options": 2
},
"regular_only_preferences": {},
"state": 1,
"was_installed_by_default": false,
"was_installed_by_oem": false
}
Another thing worth mentioning is the extension-content-verification
flag, which is a good entry point to find the relevant verification code and it would make an install possible without unpacking.
This flag can be used to turn on verification that the contents of the files on disk for extensions from the webstore match what they're expected to be. This can be used to turn on this feature if it would not otherwise have been turned on, but cannot be used to turn it off (because this setting can be tampered with by malware). #extension-content-verification
More information: http://superuser.com/questions/848664/can-i-disable-chromes-extension-content-verification
My plan is also to create a browser extension to take care of this, but until a robust solution is found python it is.
@gcarq I was referring to this mechanism: https://developer.chrome.com/extensions/external_extensions
@Eloston Is debian shipping some extensions per default? that mechanism doesn't load local .crx files.