OLX/Otomoto Ban Machine Script

This is a browser userscript that adds blocking and monitoring capabilities for OLX.pl and Otomoto.pl platforms.

Features

  • Automatically blocks unwanted listings
  • Tracks viewed items
  • Manages rating filters
  • Lightweight implementation via browser injection

Installation

  1. Install Tampermonkey extension in your browser
  2. Create new script with the following metadata:
    // ==UserScript==
    // @name         OLX/Otomoto Ban + Viewed + Rating
    // @run-at       document-end
    // @match        https://*.olx.pl/*
    // @match        https://olx.pl/*
    // @match        https://*.otomoto.pl/*
    // @match        https://otomoto.pl/*
    // @grant        none
    // ==/UserScript==
    
    (function(){
       const s = document.createElement("script");
       s.src = "https://piotereks.top/olx-otomoto-ban/ban-machine.js?_=" + Date.now();
       document.head.appendChild(s);
    })();
    

GitHub Token Requirements

The script syncs data to GitHub Gist storage. To enable this feature:

  1. Create a GitHub Personal Access Token with gist scope
  2. Grant the token write permissions (for creating and updating gists)
  3. Enter the token when prompted on first run
  4. The token is stored locally in your browser’s localStorage

Note: The token is required only for synced storage. The script works in limited mode without it (local storage only).

Operation

Upon installation, the script automatically injects a ban machine script that:

  • Blocks listings based on predefined criteria
  • Tracks viewed items in memory
  • Applies rating filters when available
  • Maintains basic user interactions

Bookmarklets

Create a new bookmark in your browser and paste the code below as the URL. Each bookmarklet loads the script hosted on this site from its full URL and calls the function it defines.

comment-all

Prompts for a comment text, then fills every comment field on the page with it (supports .comment-input, .olx-ban-inline-comment-input, and .otomoto-inline-comment-input). Collapsed ads are temporarily expanded, filled, then collapsed again.

javascript:(function(){var s=document.createElement('script');s.src='https://piotereks.top/olx-otomoto-ban-addon/comment-all.js';s.onload=function(){commentAll();};var p=document.body||document.head||document.documentElement;p.appendChild(s);})();

Source: comment-all.js

ban-all

Finds all buttons with text “BAN” and clicks them after confirmation.

javascript:(function(){var s=document.createElement('script');s.src='https://piotereks.top/olx-otomoto-ban-addon/ban-all.js';s.onload=function(){banAll();};var p=document.body||document.head||document.documentElement;p.appendChild(s);})();

Source: ban-all.js

Configuration

The script can be configured through its source file parameters. Modify the initialization code to adjust:

  • Blocking thresholds
  • View tracking persistence
  • Rating filter strictness
  • Monitor frequency