Giter Club home page Giter Club logo

template-browser-extension's Introduction

Template Browser Extension

A template browser extension. This designed to be a quick way to setup a browser extension, which can be used by loading locally or publishing the the Chrome Web Store or Firefox Add-ons store.

Tutorial

Read my post on Medium that explains more about how to create a browser extension.

JavaScript image

Save locally on your computer and run extension

  • Open your terminal
  • cd to a directory where you want to save this
  • run: git clone [email protected]:ryanwhocodes/template-browser-extension.git
  • Then open the browser you wish to use it in and follow the below instructions

Chrome

  • Visit chrome://extensions/ in your Chrome browser
  • Click Load Unpacked
  • Select the folder you saved this in

Firefox

  • Visit about:debugging
  • Click on Load Temporary Add-on
  • Select the folder you saved this in

The extension can then be viewed by clicking the icon in the address bar.

Files to edit to create your extension

The extension project structure looks like this:

extension
├── css
│   └── style.css
├── js
│   └── popup.js
├── manifest.json
└── popup.html
  • popup.html is the popup that appears when you click the extension icon in the browser's toolbar
  • jspopup.js is the JavaScript file that will run when the extension icon is clicked. This already has some functions to copy to the clipboard, to interact with the browser's tabs (depending on whether the browser is Chrome or not), and add event listeners.
  • css/style.css is the css file for your popup page
  • manifest.json update this with the configuration for your extension. If you want to add icons then you need to add them in an icons folder and then specify them here.
  • Add any other theme you want for Bootstrap easily by adding it to the css/themes folder and then link to that in popup.html

Publishing your extension

Libraries used

Mozilla and Chrome guides

The following pages were helpful when creating a web extension.

Credits

  • dmoneyballer Special thanks for helping to support compatibility with the Edge browser

template-browser-extension's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.