I am working on a chrome extension that allows users to open the browser_action by
pressing a keystroke that THEY have assigned from the options-page.
I would like to use document.onkeyup = function(){ Chrome.runtime.openPopup(); };
or something along those lines... I know that this Particular Extension API
(runtime.openPopup) only functions for mozilla firefox. I am building this extension
for Chrome & Opera so this is not an option for me.
How might I go about this? Would it be through adding chrome.commands API to
the manifest file; then modifying that file from options.html/options.js and reloading the extension? I've looked all
over for a way to do the method explained above and it doesn't seem
like that's possible.
Yes, Yes I know that Chrome has a built in method for customizing chrome extension
keyboard shortcuts, but like I said I want the user to be able to specify the
shortcut from the options.html page & I'm developing this extension for Opera
too. So that won't really work...
Any solutions?
I've tried Content.js--chrome.runtime.sendMessage
& Popup.js--chrome.runtime.onMessage.addeEventListener(function() {self.focus();});
Related
I've got a web app that requires the ability to print. Facebook's in-app implementation of Chrome doesn't allow printing. Currently, I'm giving the user instructions on how to open in chrome themselves in place of the print button I give normal users. But I'd prefer to just open Chrome for them when they get to that page, or at the very least provide a button/link that would open the page in Chrome instead of forcing them to find the settings button and figure out how to open Chrome themselves.
I've tried using the googlechrome://myurl.com approach, and Chrome opens, but the specified url doesn't load.
I've looked into Google's Intent option but I wasn't able to figure out how to open Chrome with that method.
Is there a way to accomplish this in javascript? or by some url scheme in an href attribute?
So far, all the other answers I've found give explanations for how to do this from an Android App, but not from a website.
** Update: The googlechrome://myurl.com seems to work fine from iOS in the native facebook app. It does not appear to work correctly using the native facebook app in Android.
Try
googlechrome://navigate?url=example.com
for Android users.
Reference from https://stackoverflow.com/a/12013755/9514189
I wonder why I cannot drop my extension folder into extensions tab. Developer mode is enabled and I have done it before many times!
Chrome does not allow dropping (it used to open a section to drop it there) :)
Any ideas?
Thanks!
I didn't even know it was possible to do it this way. I thought drag&drop was only for CRX installs (that Google tries to ban).
The "usual" way is to enable Developer mode, then click "Load unpacked extension" and select the folder.
Our Web application is based on IE9, which means only IE9 can open the pages in our site. We'll prevent user to browse our site when their browser is not IE9.
But sometimes we had to send a link to user's email box to complete some actions and they will open the link directly with their default browser, the problem is here, if the default browser is not IE9 then they can't open the link, they have to copy the link to IE9. Our user don't want do this manually, they want open the link in IE9 directly no matter what the default browser is.
I have tried using ActiveXObject, but it only works in IE. I want have a script which can open IE browser in Firefox/Chrome page.
It sounds like you want to have a link in an email that activates a specific program on the user's computer rather than the program that they've identified should be used (e.g., their default browser). I don't believe you can do that.
You can install "protocol handlers" in both Chrome and Safari (I suspect Firefox as well), which would let you send a link like ie://example.com/path/to/app. Your protocol handler would launch IE and take you to the relevant site. (Apple does this with iTunes.) But your users would have to install the handler (and, of course, you'd have to write it).
An easier answer might be to have the users install any of the ubiquitous "open in IE" add-ons/extensions that exist for Chrome, Firefox, etc. They follow the link, then choose "open in IE" from some kind of menu. (If they're using webmail, they may even be able to right-click the link and choose that line item, depending on the extension.)
Side note: Obviously, though, barring it being impossible I'd recommend making your application compatible with Chrome and Firefox.
No you can't do it..
but there is some alternatives:
Install your users IE tab:
FireFox - http://lifehacker.com/135297/internet-explorer-in-a-firefox-tab?tag=softwarewebpublishing,
Chrome - https://chrome.google.com/webstore/detail/hehijbfgiekmjfkfjpbkbammjbdenadd
Use a batch file that will launch your link in explorer.
use this Firefox plugin makes it possible to use (host) ActiveX controls in Firefox - http://code.google.com/p/ff-activex-host/
instead of ActiveX try using Netscape Plugin Application Programming Interface (NPAPI) - a cross-platform plugin architecture used by many web browsers.
Similar as with a batch file, you may create a link file to the page you need using the ".website" file extension with IE, which is configured in windows by default to open with ie. Put it in your webserver public folder and then add a link to that file in your website
You don't have to write code to create a custom protocol handler in Windows. See this page for how to define one in the registry.
You can use User agent switcher for chrome or firefox
For Chrome :
https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg
For Firefox :
https://addons.mozilla.org/en-US/firefox/addon/uaswitcher/
I am creating a search utility that will search various resources. I need to implement the search in a way where the results for each resource opens in a new tab. The code below works in firefox and IE, but in chrome only the first tab opens, and not the second one.
aForm.target="_blank";
aForm.submit();
I call this for each resource that I am searching (I manipulate some for variables before each submit). As I said this works in firefox and IE, but not in Chrome? Any suggestions? chrome extensions has a chrome.tabs.create() method, but for that I need to create an extension for chrome, which all users will have to install, and I would really like to avoid having to install an extension.
Also, window.open(...) for chrome opens new windows instead of tabs.
Thanks.
i've got a problem:
i need my extension for firefox 3.5+ to delete cookies. all cookies of my firefox.
example: i've serfed net, got some cookies installed on my pc by the sites i've visited. and i want my extension for ff to delete all these cookies.
could u please show me the direction where i can find an answer for my question? (or and it'll be the best, give a link to a code sample)
and one more: can i do this in javascript or i must use c/c++ and napi?
p.s.\i do not need an extension like close'forget, i want my own extension been able to do this work.
thanx for u'r future answers and sorry for my bad english...got no speach practice for a long time=(
From https://developer.mozilla.org/en/Code_snippets/Cookies , you just need to do the following in privileged javascript (i.e., inside a Firefox extension):
Components.classes["#mozilla.org/cookiemanager;1"]
.getService(Components.interfaces.nsICookieManager).removeAll();
If you want to do this without writing an extension, just go to options (Tools->Options on Windows, Edit->Preferences on Linux, Firefox->Preferences on Mac) and see the "Privacy" tab.