Local NodeJS Web server to track and shape browsing habits.

Default configuration in index.js#L52-L65 that can be replaced by config.json.

{id:"twitter",pattern:/.*twitter\.com.*/,perHour:1,perDay:12},
{id:"proton",pattern:/.*proton\.me.*/,perHour:6,perDay:6*12},
{id:"yt",pattern:/https:\/\/www\.youtube\.com.*/,perHour:2,perDay:12}, // allow for redirection
{id:"yts",pattern:/https:\/\/youtube\.com.*/,perHour:2,perDay:12}, // allow for redirection, consider merged IDs
{id:"linkedin",pattern:/.*linkedin\.com.*/,perHour:1,perDay:12},
{id:"reddit",pattern:/.*reddit\.com.*/,perHour:3,perDay:12,redirect:'https://lemmy.world/'}, // redirection then enough to read private messages
// reconsider the tridactyl check for permanently open pages, e.g TabEnter rather than DocStart
{id:"element",pattern:/.*element\.io.*/,perHour:1,perDay:12},
{id:"discord",pattern:/.*discord\.com.*/,perHour:1,perDay:12},

Related visibility paradox of technological minimalism in https://fabien.benetou.fr/Languages/OwnConcepts linking back here.

Installation

  • npm i express
  • node .
  • install in your browser the tridactyl add-on
  • setup autocmd DocStart .* js fetch('http://localhost:7788/check?url='+window.location.href).then(r => r.json()).then( r => { if(!r.passed) { if (r.redirect) { window.location.href = r.redirect } else { window.location.href = 'https://ggsc.berkeley.edu/'} } } )
Description
No description provided
Readme 32 KiB
Languages
JavaScript 100%