DEV Community

Cover image for Browser extensions - our first extension

Browser extensions - our first extension

Chris Bongers on August 11, 2022

Now that we learned the different types of extensions, let's see how we can create our first browser extension. In this article, we'll create an e...
Collapse
 
supportic profile image
Supportic • Edited

Creating an extension with manifest v2 at this point will be pretty much outdated, when 2023 hits.
developer.chrome.com/docs/extensio...
developer.chrome.com/docs/extensio...

v3 allows you to build an extension for firefox and chrome at once. :)

Collapse
 
dailydevtips1 profile image
Chris Bongers

Ah yes, aware of that, the new articles are on v3.
I kind of default to v2 for some support we are missing in our own ones πŸ˜… (habit)

Collapse
 
shahednasser profile image
Shahed Nasser

Thanks for writing a nice and simple introduction into how to create extensions! I think a lot of people are not aware of how easy it is to create an extension, so this does a good job of showing the basics of it!

Since you’re creating a series around this topic, I would recommend you mention the importance of supporting v3 moving forward. I know that firefox currently does not support v3, but when you develop more and more extensions you’ll realize anyway that you can’t really write the same code or tutorial for both browsers. Also, moving from v2 to v3 can be difficult as there are many changes between the two versions.

Collapse
 
dailydevtips1 profile image
Chris Bongers

Yeah I think the new ones I use v3 all over.
I default to v2 as we need to support firefox, would really wish they hurry up and make it accept v3 😒

Collapse
 
shahednasser profile image
Shahed Nasser

According to this seems like Firefox will be supporting v3 by the end of this year. However, they’re looking into different ways for adapting it. So, again, one codebase for an extension wouldn’t be enough, you would need to write 2 to support chrominum browsers and firefox.

Honestly, after publishing two extensions, I found managing that a hassle and fully dropped support for firefox. Not sure how other devs feel about this too πŸ˜…

Thread Thread
 
dailydevtips1 profile image
Chris Bongers

We still run mv2 for daily .dev and so far it's been good with one build.
However we're lucky to be a "older" extension so not forced to migrate to 3 for Chrome standards.

Collapse
 
yuridevat profile image
Julia πŸ‘©πŸ»β€πŸ’» GDE

Nice article on how to create a simple extension. Very beginner friendly!

Collapse
 
dailydevtips1 profile image
Chris Bongers

Glad you enjoyed it Julia.
Got a whole beginner series coming up πŸ’–

Collapse
 
yuridevat profile image
Julia πŸ‘©πŸ»β€πŸ’» GDE

Nice! Canβ€˜t wait to read them 😎

Collapse
 
bellatrix profile image
Sakshi

Nice tutorial

Collapse
 
dailydevtips1 profile image
Chris Bongers

Thanks a lot Sakshi πŸ™

Collapse
 
shshank profile image
Shshank

Nice and beginner friendly artic. Thanks for sharing.

Collapse
 
dailydevtips1 profile image
Chris Bongers

Glad you enjoyed it πŸ’–

Collapse
 
devgancode profile image
Ganesh Patil

Well explained!

Collapse
 
dailydevtips1 profile image
Chris Bongers

Thank you Ganesh πŸ™

Collapse
 
alidarrudi profile image
ali

The article was interesting, don't be bored

Collapse
 
dailydevtips1 profile image
Chris Bongers

Thanks, glad you enjoyed it ✨

Collapse
 
dailydevtips1 profile image
Chris Bongers

Hi Khanh, I have not explicitly tested it in Firefox, they might use a slightly different way of defining the title bar.
I'll look into that.