Giter VIP home page Giter VIP logo

total-suspender-webextension's Introduction

Total Suspender

Maintainability Build Status

A not-so-minimalistic web extension for Firefox that suspends natively (with tabs.discard) not-active tabs.

Addon page on mozilla.org

Features

  • Only minimal user-permissions are required (storage to save configuration and tabs)
  • Whitelisting and blacklisting features. You can enter URLs or their parts to the corresponding field and the tabs, which url's contain these patterns will (not) be discarded. May be useful when reading manuals or browsing tubes.
  • Supports regex (for some reason)
  • Can ignore tabs playing sound
  • Implements delayed suspend feature
  • Suspends inactive loaded tabs only if their number exceeds the threshold set

Build

Linux

  1. Install node and npm

  2. In the project directory run make install

  3. In the project directory run one of these commands:

    make build-dev to build for development

    make build-prod to build for production

    make pack to build production version and pack it with web-ext

Building has been tested with:

  • Node.js version 11.15.0
  • npm version 6.9.0
  • Arch Linux (5.1.7 x86-64)

Windows

  1. Install node and npm

  2. Int the project directory run npm run install

  3. In the project directory run one of these commands:

    npm run build-dev to build for development

    npm run build-prod to build for production

    npm run pack to build production version and pack it with web-ext

Building has been tested with:

  • Node.js version 10.13.0
  • npm version 6.9.0
  • Windows 7 SP1

For verification and calculating diffs with submitted addon, use Windows configuration. On Linux and MacOS systems diff will fail because of line endings difference affecting webpack hash generation. Or use diff with --strip-trailing-cr on .html and .js files.

Development

To monitor changes in browser with hot-reloading you can do

  • npm run watch or make watch to start rebuilding dist on every save in src directory. This is achieved via running webpack and web-ext both in watch mode with concurrently npm package. You can load extension in browser with npm run browser or make browser.
  • Sometimes the above is not the best choice, since browser can stop reloading the extension rebuild due to errors, in this case you should avoid running webpack and web-ext in watch mode. If you want to monitor changes, you can just npm run browser once after first build-dev and then run build-dev on each change you want to inspect.

Internationalization

The extension uses i18n, so if you want to participate in translating the extension texts into your language, please, refer to messages.json as an example and either create a pull request or create an issue on github. Note, that only "messages" properties needs to be translated, "descriptions" are aimed to help translators.

Problems, requests, suggestions

If you find a problem, please, create an issue.

total-suspender-webextension's People

Contributors

k5md avatar dev0pher avatar vinnl avatar jrie avatar

Watchers

James Cloos 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.