• Stars
    star
    141
  • Rank 259,186 (Top 6 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 3 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

User scripts for Bromite (mostly enhanced Ad/Annoyance Blocking)

Bromite User Scripts

This is a repository that hosts User Scripts for Bromite, an Android browser. They might also work on other mobile or desktop browsers, but I only use them on Bromite.

Scripts

Here scripts are sorted by category. See below on how to install them into your browser.

Blockers

Bromite has a built-in ad blocker (also see my Bromite ad blocking project), but some sites are very good at bypassing it. We can improve blocking on these sites using scripts.

  • Twitter: block ads on Twitter (sponsored tweets, trends etc.)
  • I don't care about cookies: block all kinds of cookie prompts.
    • This script is based on the "I don't care about cookies" browser extension (GPL).
    • This script is automatically regenerated from time to time, keeping up to date with the latest rules from the browser extension
    • Security consideration: if the author of the browser extension inserts malicious code, this script would likely also contain that code
    • In my tests, this script added around 30-100ms to the load time of websites, so its impact is really small despite the rather large size of around 1MB
  • Cosmetic AdBlock: block annoying elements
    • You can also use the lite version with about half the size, it only includes rules for the top 250k domains from this top 1M domains dataset
    • The Bromite AdBlock engine does not support cosmetic filtering, so this script implements that capability (to a very basic extent)
    • This script doesn't know about exception rules, so it will block too many elements on some pages
    • Rules are regenerated once a week from the filter lists defined in this file
    • Do not use the normal script on less powerful devices
      • In my performance tests, sites take an average of 300-400ms longer to load ("first contentful paint" metric) when the script is active (tests were done on a Mi Mix 2, a phone released 2017)
      • However, it takes way more than 400ms to manually click "Decline" on an annoying popup, so I think it is a good tradeoff

Installing a script

Make sure you have a recent version of Bromite installed. Then you can follow these steps:

  1. At first you need to download the script file. You can do this for the scripts in this repository by holding on the link until the menu appears, then selecting "Download link"
  2. Now you can go to Bromite settings (three dots at the top right, then Settings)
  3. Scroll down to open the "User Scripts" section under the "Advanced" menu
  4. Make sure "Activate User Scripts" is enabled/on
  5. Select the "Add script" button
  6. Now select the file you just downloaded (likely in your downloads directory)
  7. Confirm the installation
  8. (Optionally) Click the "View source" button to verify the content of the script
  9. Enable the newly installed script using the switch at the left side

Auto-generated scripts

Some scripts are auto-generated (because they need to be regenerated from time to time to include up to date sources). The source code for the generators is in subdirectories of the generate directory.

You can see statistics (e.g. number of included rules) in the latest release.

Creating your own scripts

You can also create your own scripts, see the official documentation on how to do that. You should read the Chromium User Script Design Document to learn about existing pitfalls.

I recommend trying out remote debugging via a desktop browser if your script doesn't behave as expected.

If you want to remove certain elements on dynamic pages (like Twitter), I recommend this snippet of code, it's very helpful.

Issues & Contributing

If you have any issues with these scripts (e.g. some ads aren't blocked for an ad blocking script), please feel free to open an issue. Also if you want to add something, feel free to do that :)

License

All scripts unless otherwise noted are published under the MIT License (see the LICENSE file). Some scripts might be licensed differently (e.g. because they are derived from GPL-licensed works), which is indicated by the license header at the top of the file

More Repositories

1

filtrite

Custom AdBlock filterlist generator for Bromite and Cromite
Go
254
star
2

upduck

simple web server that integrates with DuckDNS & Let's Encrypt
Go
98
star
3

Collect

A server to collect & archive websites that also supports video downloads
TypeScript
78
star
4

ax

Minimal x86-64 emulator for WebAssembly - run ELF binaries in your browser
Rust
36
star
5

fdroid

Auto-updating F-Droid repo using GitHub Actions
Go
31
star
6

sensibleHub

self-hosted music management server with a web interface and FTP sync for offline listening
Go
23
star
7

userchrome.css

Firefox Proton userChrome.css customizations
CSS
12
star
8

backtap

Magisk module for Android that taps the screen when the fingerprint sensor is tapped using the Linux Multitouch Protocol
Go
12
star
9

subresource_filter_tools

Scripts that build Chromium's subresource_filter_tools (including ruleset_converter) for both Linux and Windows. These tools can be used to generate ad block filters for Bromite
Shell
12
star
10

filtrite-lists

Bromite custom filter list search
Go
7
star
11

jsonextract

Go package for finding and extracting any JavaScript object (not just JSON) from an io.Reader
Go
7
star
12

notality

A very simple note taking app for Android
Dart
6
star
13

rockit

Rock It! is an Android app that helps you stay informed on all things space
Dart
6
star
14

nervig

AdBlock rules I use with uBlock Origin and Bromite
5
star
15

spacex-hop-bot

Twitter bot that (re)tweets relevant info about the SpaceX Starship
Go
4
star
16

poliwiki

Twitter-Bot, der interessante Änderungen an Wiki-Einträgen von Politikern postet
Go
4
star
17

TUM-userscripts

User scripts for online services of the Technical University of Munich
JavaScript
4
star
18

artemgus

Artemgus image generator
HTML
3
star
19

ImageSort

Sort thousands of images in less time
C#
3
star
20

stm32-flash-corruptor

Intentionally corrupt STM32 flash to test code handling the flash ECCD interrupt
Rust
2
star
21

gover

Raspberry Pi powered rover that can be controlled using a smartphone, PC or Xbox controller
Go
2
star
22

MemeAssembly-vscode

VSCode extension for MemeAssembly developers
TypeScript
2
star
23

github-release-stats

Summarize release stats for your repositories
Vue
2
star
24

mysti

Self-hosted clipboard sync and remote command runner for Linux and Windows
Rust
2
star
25

adc

fast and automatic adb connect
Go
1
star
26

memeassembly-playground

[Deprecated] Experimental MemeAssembly playground with x86_64 assembler & emulation right in the browser
TypeScript
1
star
27

ccan-archiver

Downloader for archiving files from CCAN and Clonk-Center
Go
1
star
28

memeasm

Programs written in MemeAssembly
C
1
star
29

mips-asm

Experiments with MIPS 32-bit Assembly
Assembly
1
star
30

xarantolus

GitHub profile readme
1
star
31

reeesolve

Server for resolving redirect URLs
Go
1
star
32

assembly-script

x86-64 Assembler for the browser, supporting a small subset of the GNU Assembler Intel syntax
Rust
1
star