As a result of the dicussion on
What needs to be done to make multiple screen support for Javascript happen?
i am looking into the state of affairs with Firefox and found this issue
https://github.com/mozilla/standards-positions/issues/180
As it looks it's possible to use the API on Firefox. I'd like to test this.
What environment would be needed for this to show an example?
Related
I managed to create a Chrome extension pretty easy and the main application is hosted on my server allowing me to provide updates to the app itself without having to update the whole extension. I like the idea and I just want to know if it's possible to create a similar extension for Firefox where the main application is hosted on a live server.
In creating my Chrome extension, I followed a tutorial. The code for Chrome is included on the linked page.
It's possible to create a simple extension that loads a web app either in a panel or a tab. You should read up on the Addon SDK documentation, including the panel, tabs and getting started docs.
There is nothing wrong with this, as the web app would not have direct access to internal Firefox APIs. If you read the Addon guidelines closely that #makyen links to above, none of it covers this implementation detail. In their defence, they seem to have misinterpreted what you want to do. It looks to me like you just want to integrate / launch your web app from the browser UI?
Web application:
After finding the tutorial (please provide a link next time) I surmise you are referring to in your question, I suspect that what you are actually attempting to convey is different than how I initially interpreted your question. I have edited the question to make this more clear to people reading it in the future.
That tutorial is explaining how to place a link to a web application into the Chrome user interface. Such is, to a large extent, just a bookmark that is able to be placed within other areas of the user interface than the bookmarks bar.
If that is what you are wanting to do, then, yes, you can easily do so in Firefox. Given that the extension is not running external content in the security context of an extension (you are effectively just navigating to and displaying a website), then that should be fine as a Firefox extension. Note that you need to be sure that you are not granting elevated permissions when you launch the web application.
If running a web application is what you are wanting to do, then I suggest you might want to use different semantics to refer to what you are doing. The above is not a "Firefox extension app hosted on server". Saying it that way strongly implies that you are hosting the actual extension code on your own server. The rest of your question implies that the extension dynamically loads external code and runs it. I would suggest that you refer to it as something like: a web application that is launched (navigated to) by a Firefox extension allowing the web application to be started from an icon in the toolbar.
Extension running web sourced code:
However, if what you are wanting to do is have external content running as a Firefox extension, then implementing that functionality is a large security hole for anyone installing the extension. Even assuming that your intentions are totally benign, there is a huge security hole for anyone who is intercepting your traffic, or gains control of your server to inject code into Firefox that runs at the level of an extension (i.e. the malware can have full control of the browser and then of the computer).
Yes, it is currently possible for you to write this for Firefox.
However, given that the extension pulls code from something not packaged within the extension, the extension will never be permitted to be hosted on AMO.
In addition, the plan is that later this year there will be mandatory signing of Firefox extensions through Mozilla. I doubt that an extension like this will be permitted at that time.
You can read a set of Add-on guidelines on MDN.
I've read all the stuff about how it's no longer possible to copy to clipboard with a click, and the clever ways that folks like Trello are making do without this functionality... but then Google just updated Docs with the exact feature we're looking for:
How do they do it?
Might be the new execCommand api for contentEditable areas.
Documentation : https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand#Browser_Compatibility
IE 10+, Chrome 43+, and Opera 29+ support these commands.
IE and Chrome offer window.performance.getEntries(); to get information about performance of entities in a webpage.
In both FireFox and Safari, this command is undefined when I try to use it from the console.
So, my question is: what is the alternative in FireFox and Safari for this functionality?
EDIT:
I'm using this command via Javascript. Hence I need an alternative also for other browsers.
CanIUse says something for resource timing (which is part of what youre asking): http://caniuse.com/#search=resource timing
Also it says
This feature can be enabled in about:config, search for dom.enable_resource_timing flag
By default it is turned off, you'll have to ask your users to switch it on manually, or to write a plugin for this purpose
Now window.performance.getEntries(); works fine in Firefox, but the problem remains for Safari.
What is the best way to create one browser addon or bookmarklet that would seamlessly work on IE, Firefox and chrome, is there some google gadget that would let you do it?
This all depends on what you actually want to create. If your addon requires things like local storage or the use of xPath or other browser specific items than doing this seamlessly and correctly across the multiple platforms wouldn't be incredibly easy.
Generally speaking all the browsers are quite different. Chrome and Safari run webkit, Firefox Gecko and so on. Some support HTML5 well, others don't. If you're creating something complex you will have to do so for each individual browser. However, much of the code from one can be re-purposed with a few extra / different calls on another. Firefox for example has a lot in common with Chrome and Safari and Chrome and Safari are even more so closely related.
If your addon is very simple I'd recommend going with just a bookmarklet take a look at this http://www.smashingmagazine.com/2010/05/23/make-your-own-bookmarklets-with-jquery/ using JQuery will help solve some if not all of the browser specific issue's you'll run into.
If you require an addon/extension or a bookmarklet do it with JQuery where possible.
I can't really give a more specific yes or no answer without more information. If you could please expand on perhaps what you're looking to do it would be much easier to help you.
I read that early builds of Chrome supported ActiveX, but was later restricted to certain MIME types (for support for say Windows Media Player). I then read Google was going to enable ActiveX strictly for the Korean market. How do I (re)enable this in Chrome?
Our web based product relies on ActiveX controls from 3rd parties to play custom video. This limits us to IE. We'd love to support Chrome also, but find it impossible w/o ActiveX support.
There is a proprietary plugin called "Neptune" which says that it will allow you to use IE Tab functionality in Chrome on Windows.
Meadroid do this because they have ActiveX controls which they have written and they want them to be able to work in any browser, and they explicitly mention Chrome in the list of supported browsers for enabling ActiveX with this.
There is also a modified version of Chrome, called ChromePlus, which includes IETab, among other extra features.
I've not used either of these personally, but they look like they'll do what you want. I'd be interested to hear if they work out for you, as I know of other people who want to be able to use IEtab in Chrome :)
anyone who says activex is less secure then NPAPI is crazy. They both allow the exact same access. Yes I've written both. The only reason people think activeX is insecure is because 10+ years ago IE had default settings that allowed a remote site to auto download the plugin.
maybe this new Chrome extension helps:
ActiveX for Chrome
https://chrome.google.com/extensions/detail/lgllffgicojgllpmdbemgglaponefajn/
This could be pretty ugly, but doesn't Chrome use the NPAPI for plugins like Safari? In that case, you could write a wrapper plugin with the NPAPI that made the appropriate ActiveX creation and calls to run the plugin. If you do a lot of scripting against those plugins, you might have to be a bit of work to proxy those calls through to the wrapped ActiveX control.
I'm not an expert but it sounds to me that this is something you could only do if you built the browser yourself - ie, not something done in a web page. I'm not sure that the sources for Chrome are publicly available (I think they are though), but the sources are what you'd probably need to change for this.
http://wiki.answers.com/Q/Does_Google_Chrome_support_ActiveX
Google Chrome comes with an ActiveX
shim, as part of its default plugin
array. So Google Chrome features at
least partial support for ActiveX
controls (as do many non-Internet
Explorer browsers). I can't find
information as to whether or not this
includes support for ActiveX security
certificates or the like, nor if/where
such plugins can be controlled, within
the browser.
..... Note that to enable the plug-in
you must run Chrome with the following
switch " --allow-all-activex" So in
shortcut that is used to start up
Chrome, add this after "Chrome.exe"
I downloaded this "IE Tab Multi" from Chrome. It works good! http://iblogbox.com/chrome/ietab/alert.php