11.8: Cross-Browser Extensions – Programming with Text

hello I’m very excited to do this video for you it’s a little bit scary because I’m going to attempt to do something this video that I have no idea how to do and I’ve never looked at it before but I did receive this tweet from Nicholas who writes hey Daniel could you say browser or web extension most of the major browsers have the same set of api’s so making a cross browser extension is easily doable see this link so it is true that this idea of an a brat a Chrome extension is not something limited to the Chrome browser and I’ve been saying Chrome extension all this time because it’s what I was familiar what I’m familiar with and what I’ve used before but this idea of an extension is can be thought of in a larger broader way as a browser extension there is a uniform standard API from the Mozilla Foundation we can look at it here for a browser extensions so could I possibly in this video take one of my extensions I made like the kitten one and just make it work in Firefox as a browser extension this is what I’m going to attempt to do well your first extension let’s look at that I think I could skip what are extensions oh oh so I need a manifest.json hey look at this it looks like I’ve done this already so actually I have a feeling I don’t know if the chicken or the egg came first but I do know that I like I like a vegetarian omelet it’s quite delicious now I can’t be vegan obviously because eggs aren’t but anyway I just I like vegetables that’s am I really talking about that now no but this looks like so much so let me just go get my let’s what is it possible that I could just run by extension in Firefox I don’t actually recode it at all so let’s go to all these these are all the extensions that I made with the exception of the first reserve bookmark content script background script two kittens one the sketch one the pop ups let’s try the kittens one i’m let’s try the kids one so i’m gonna just make get a new folder whoops I’m gonna copy it and I’m gonna call it 0:08 browser kittens just I want to in case I have to change some aspects of it let’s leave that so it’s just a Content script with a kittens a folder of kittens and a manifesto JSON alright so let’s see here how do I load an extension open firefox enter about debugging in the URL bar click load temporary add-on so that seems like what I have to do about debugging ah there we go enable add-on debugging sure load temporary add on extensions browser kittens open open no no do I just select a manifesto JSON file alright it’s there the oh it says Chrome that’s the worst so let me at least fix that let me go to the manifesto JSON and say browser this is now a browser X kitchen and if you want to watch the video where I programmed this extension I’ll link to it in this video’s description so now let me reload and then it should be running how about just go to Schiffman net oh it worked good look kittens kittens everywhere kittens it worked so what’s nice to see here and actually it’s nice to that that this is an open standard that this idea of an extension you can look at the chrome specific API the documentation and make Chrome extensions but your code for the most part without and perhaps some minor changes I’m sure I mean this is a very simplistic extension but so there might be other things but you can look at this Mozilla documentation page to create cross browser extensions cross browser kittens for all so I hope you enjoyed them has now become a very short video I would be happy to load my other extensions and see how that works let’s just at least load one that has a button let’s so now I’m gonna be ambitious and I’m just going to say load I’m gonna load one that I made for looking up words and getting their definitions from word next I’m gonna open up this one and I guess I have to within Chrome I select the folder looks like I select the manifest.json file so word look up now you can see look my button is there and I can go to let’s go to a Wikipedia page for like rainbow and they’re still replacing things with cats look I don’t have a kitten here and I’m gonna select sky click here and look at that the expanse of air over any given point on the earth the upper atmosphere as seen from the earth service so I’m really disappointed I was a disappointed with myself but that’s probably not the right thing to say right here but I I pray that I had sort of started with this knowledge and from this point of view because as much as possible I like to use generic and open tools that can be applied to a lot of different things like different browsers or different operating systems but so but hopefully this is this video allows you to see if you want to do one of your extensions for a different browser you can all you can do that so thank you all for watching and I will see you in another time in another video maybe maybe if if you want you could uh yeah ok no no that’s fine don’t don’t just just go on with your day [Music]

Leave a Reply

Your email address will not be published. Required fields are marked *