Max
Max

Reputation: 4408

creating a browser independent bookmarklet or browser addon

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?

Upvotes: 0

Views: 303

Answers (1)

Aidanc
Aidanc

Reputation: 7011

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.

Upvotes: 1

Related Questions