Skip to content

elijahrogers/sleeping_policeman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Sleeping Policeman

Slow down! Sleeping Policeman will slow down the infinite scroll of Twitter and Reddit based on your usage every day.

Download for Firefox · Report Bug · Request Feature

Getting Started

popup

The easiest way to use Sleeping Policeman is to download the extension directly from Mozilla via addons.mozilla.org (AMO). It can also be run as a temporary add-on locally using the instructions below.


Installation

This will allow you to load the extension as a temporary add-on for local debugging. It requires yarn to build JS using parcel.

  1. Clone this repo: git clone https://github.com/elijahrogers/sleeping_policeman.git
  2. Install packages and build: yarn install && yarn watch
  3. Navigate to about:debuggingin Firefox
  4. Click "This Firefox"
  5. Click "Load Temporary Add-on"
  6. Open the extension's directory and select the manifest.json file

Usage

When the appropriate checkbox for Reddit or Twitter is checked Sleeping Policeman will automatically count requests and add a delay to any GET requests based on the following formula:

  Math.sqrt(Math.floor(currentRequestCount(site) / 50)) * 250

The delay increases sublinearly:

Number of requests Delay
0 0ms
50 250ms
100 ~354ms
500 ~790ms
1000 ~1.1s

The request count is reset each day and unchecking the checkbox will disable the delay.

License

Distributed under the GNU GPL-3.0 License. See LICENSE.txt for more information.

Releases

No releases published

Packages

No packages published