Moz Add-Ons Day

So this was the event for i was working for around 2 weeks before the date of event. As a organiser it was my second event , other was Mozilla NIEC Activate. This time i was making this free workshop more bigger and useful. We were making arrangements for around 100+ attendees so there was a lot of stuff had to manage like refreshments for all, event poster , and main work was to make announcements in every class in our college especially in first year students classrooms so that to involve more students from freshman years. So there was all set and on D-Day 19th of August , I landed in Delhi around 6 AM on 19th , i was so tired. After came to Delhi i went home and grabbed the standy of Mozilla , and then went to college for all setup.As there was a huge response from interested students, we have more than 270 registration, but in last i sent 130 invitations based on their Javascript Expertise and also the strength of Auditorium is for 130 peoples only 😦 . So i reached college around 9.30 AM, Pushpita , the mentor of this event was waiting on main gate of college 😦 .

So the attendees started to come to college and so till 10:30 AM we have 60+ attendees in the auditorium so we started the event with what is Mozilla and then we had a little session on Javascript till 12 AM, till now almost 100 students in Auditorium then Trishul ( Mozilla Add-Ons Developer ) introduced all of us about “Mozilla Add-Ons” and how to develop those. Then around 1 PM we had a little break for snacks which i ordered already and reached college on time :P. After that the core development of Add-ons started. So Trishul started event with a simple add-on which will just adds a color border to any pages loaded from “mozilla.org” or any of its subdomains. So i am trying here to explain how we can make this extension I hope all of you will understand it :).

So first there is a simple manifest.json file under any new directory you make ,lets for example borderify.

{

  "manifest_version": 2,
  "name": "Borderify",
  "version": "1.0",

  "description": "Adds a red border to all webpages matching mozilla.org.",

  "icons": {
    "48": "icons/border-48.png"
  },

  "content_scripts": [
    {
      "matches": ["*://*.mozilla.org/*"],
      "js": ["borderify.js"]
    }
  ]

}

 

Here the first three keys: manifest_versionname, and version, are mandatory and contain basic metadata for the extension.description is optional, but recommended: it’s displayed in the Add-ons Manager.icons is optional, but recommended: it allows you to specify an icon for the extension, that will be shown in the Add-ons Manager. The most interesting key here is content_scripts, which tells Firefox to load a script into Web pages whose URL matches a specific pattern. In this case, we’re asking Firefox to load a script called “borderify.js” into all HTTP or HTTPS pages served from “mozilla.org” or any of its subdomains.

If you do need to specify an add-on ID, include the  applications key in manifest.json and set its id property.

"applications": {
  "gecko": {
    "id": "borderify@example.com"
  }
}

 

Create the “icons” directory directly under the “borderify” directory. Save an icon there named “border-48.png”. As our manifest.json promised that we would have an icon at “icons/border-48.png”.

Finally, create a file called “borderify.js” directly under the “borderify” directory. Give it this content:

document.body.style.border = "5px solid red";

So finally we finished our code then we have to add this add-ons to our Firefox Browser. You can do that simply by watching this video :).

I hope you understood this code. Here some of the images of the event :).

WhatsApp Image 2017-08-25 at 11.50.37 PM

 

And the image after the event. You can find me easily sat down most left with weedy eyes as did not sleep from 3 days and travelled more than 800 kms in last 3 days.

image.JPG

Thanks for reading. Cheers 🙂

Advertisements

One thought on “Moz Add-Ons Day

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s