I had a chrome extension built for me and it helps me publish to my wordpress with ease. The problem is that I have a few websites that I would like to use the same extension for which involves nothing more than changing the URL in the extension's settings.
The real question
Assuming I made 3 copies of the same extension, what changes must be implemented in each one to make Google Chrome recognize it as a different extension? Right now, if I change certain attributes in the manifest, Chrome will still recognize it as the original extension and will want to replace the extension I already have installed.
I hope this makes sense. Apparently someone didn't understand what I was talking about so I broke it down. Hope someone can help me out.
I'm only guessing, but I would think that it would be the name field found in the manifest.json file. In theory, if you are managing your own .crx file (for packaged extensions), I guess Chrome could use the name of that file as well. And finally, if you are signing your extension and making it available through the market, the cryptographic signature could be used as well (the .pem being created when you package your extension).
So no real answer, but I believe it must be one of these three (name in manifest, name of crx file or cryptographic signature). If you test it and figure out, be sure to share!
Related
The filesystem API cannot be used by unpacked extensions, which is awfully great for development.
But then the real surprise came when I realized I can't use it also with my extension packed, because Chrome tells me it cannot find it in the store and is thus greyed out.
Is there any way to actually develop with the filesystem API then?
My goal, in case this is the wrong direction in the first place, is to write some text to a file when some events in the browser happen. The file should be rewritten, rather than creating a new file, which is why I can't use the downloads API.
Is there any way out of this conundrum?
For anyone stumbling on the same issue - a decent solution is to use the chrome.downloads API to download the file in overwrite and incognito mode.
Overwrite will stop the automatic indices added to downloaded file names, and incognito makes the download invisible in the browser except for incognito windows.
The main shortcoming is that it is of course constrained to the user's downloads folder.
I have a personal chrome extension that always runs in development mode. I need it to communicate with a public extension (execute one of its function to be more specific).
Is there any way to get background page of the other extension so I can do this?
I also tried modifying source code of the other extension manually but then chrome show it as corrupted and ask me to reinstall it
Not really, no.
You cannot inject scripts into chrome-extension:// origin of a different extension, and attaching a debugger there (without whitelisted, private APIs) is going to be tricky (custom launch flags), if at all possible. Note that there's a feature request to allow that.
As suggested by wOxxOm, your best bet is to create a personal copy of the other extension (if at all possible); perhaps adding hooks for External Messaging or merging your code in.
I added two extensions to my google chrome that I want to send to some extern users, which are not "technical" people (I mean that they don't have IT skills). Instead of showing them how they can download and add an extension to their google chrome, I want to simplify this task by sending them an installation file of chrome (or chromium) which already contains these two extensions. So, in this case, the only thing that they have to do is just to do a normal installation (with the .exe file since they use only windows) like there are installing a normal google chrome! After that, they will have a chrome which already includes these two extensions.
Can you tall me how can I do that? because I have no idea of it..
Thank you!!
Chrome has instruction for doing this here: https://developer.chrome.com/extensions/external_extensions. You should be able to do it via a registry addition.
Note, as of Chrome 33, you will need to publish the extension to the store, and you just add update urls. Chrome does not allow installation otherwise for security reasons.
The default behavior for chrome.downloads.download is to download to the default download folder. It doesn't remember it if you change the folder. Can we save the download-to location for the next call-out?
References: https://developer.chrome.com/extensions/downloads
It's concerning that Chrome actually doesn't provide the ability for an extension to get the last download path. Some say, it's due to security concern and others say, there is no significant need to have the API available to users.
You also cannot store the download path in your extension because Chrome doesn't let you get the selected download folder. I hope Google provides us with the either of these features later.
This is not a supported feature, according to this Chromium discussion.
Summary:
If you specify a filename, it's never possible to save outside of ~/Downloads (this is a bummer, for me)
You should be able to manually implement something (in a subfolder only) using the id returned from Chrome.downloads.download
A few quotes I like (edited for brevity and politeness):
Would like a download option to choose recent download folder. Would be good to remember last download location per website, like you other settings.
Seems reasonable.
Chrome does remember the last chosen directory if no filename is specified to downloads.download with Save As... Given how Save As works without specifying a filename, my intuition would be it would work the same with a filename... but it doesn't.
That one is interesting. So it kind of supports it already. There's no security concern with saving outside of Downloads.
I have just been able to restore the "remember last download location" functionality, which used to work on my previous machine, in a new install by disabling extensions and Chrome apps provided by Google. This is what I have turned off:
Extension: Google Docs Offline
Chrome Apps: Docs, Sheets, Slides
I haven't tried to narrow down which of these have been the culprit, or if any other extensions (I have a bunch) have played a role. So YMMV. Good luck :)
SOLVED. Very simple way: Insert a USB-drive or SD-card. Go to chrome settings, and specify this drive as the default download location.
Remove the drive/SD-card. Download something - the first time you do it, Chrome will offer to save to your user document folder, but instead, you save it to whereever you want.
This location will be remembered next time. Voila. So easy.
In fact, you can save previous the download location.
If you do a clean install, first of everything, change the download settings to "ask every time". It is very important not to click the text box where you can specify one download location (if you click there just once, you need a clean install again).
Chrome will then bring up the download window with your last save location.
Furthermore, you should uncheck the "settings" in the sync preferences because it will break every time you sync your settings to a new browser.
I'm about to start a Chrome packaged app project which will include a NaCl component to parse CHM files. But before I start, I just want to check if it's possible to get the app to automatically launch when a CHM is opened (when the users clicks on a link to an chm file, or possibly if a chm file is dragged into a Chrome window).
I've come across some Google documentation here which describes associating NaCl modules with MIME types in the extension manifest, but A: I'm not sure if this is relevant to my problem and B: I've tried doing as it describes, but nothing seems to change.
If anyone can point me in the right direction, I'd appreciate it!
I was able to hack around with chrome.webRequest to filter URLs with .chm extensions, but of course that only works when a user clicks on a direct link to a CHM file, and there is no way I know of to access local files outside the sandbox (for good reason no doubt).
I have since decided to make the project a Drive app with the C++ portion squirreled away inside a DLL on an ASP.net server, which makes a lot more sense to me.