Skip to content

Instantly share code, notes, and snippets.

@mindbound
Last active May 24, 2024 14:12
Show Gist options
  • Save mindbound/cb795d3b04756a953af30a403fa58416 to your computer and use it in GitHub Desktop.
Save mindbound/cb795d3b04756a953af30a403fa58416 to your computer and use it in GitHub Desktop.
LCF README

Installation

  1. Ensure your browser is up to date
  2. Install Tampermonkey:
  3. Go to https://gist.github.com/mindbound/4e96536c3287f9acbcb9b7d0ed8909a9
  4. Click the Raw button at the top of the file to view its source

Tampermonkey should automatically open a script installation page. If it does not:

  1. Copy the script source from the link in previous list's Step 3
  2. Click on the Tampermonkey icon in your browser's extension toolbar
  3. Click the Create a new script menu item (icon with a plus symbol)
  4. Paste the source into the script editor and click Save in the editor's File menu

Usage

The LCF script is only available when browsing http://klab.lv/stats/latest.bml.

The LCF script has a blacklist and a whitelist mode. Only one mode is active at a time but can be switched at any time. The blacklist mode filters from the latest posts all user names in the script's list, whereas the whitelist mode filters all user names except for the ones in the script's list. Both lists are saved separately and are preserved when the page is reloaded or the browser is restarted. Lists are stored locally and no information is shared outside the user's browser.

The lists can be created by clicking the LCF's Settings menu item, which appears when the script is available.

This opens the script's configuration panel.

By default, the script operates in blacklist mode. In either mode, enter the user names in the Filter List text area, one user name per line, then click Save. Refreshing the page may be necessary for the changes to be applied. To switch between blacklist and whitelist modes, use the Filter mode dropdown menu.

In addition to specifying individual user names, both lists support * and + filters for batch filtering. The * filter affects all user names that contain the name, including that name, while + affects only those user names that start with the name and add additional numbers, letters, or underscores.

Filter Sample Results
user* user, user1, usera, user_b
user+ user1, usera, user_b

In addition to filtering out names by hand, the blacklist mode offers several additional filters:

  1. Filter all new users: Filters out all newly created users (uses the New Journals list from http://klab.lv/stats.bml)
  2. Filter all images: Filters out all images from all posts
  3. ML-assisted filter: Uses a machine learning model to filter out user names that are random character combinations

The ML-assisted filter may produce false positives (filtered out non-random user names) and false negatives (random user names not filtered out), which is a common flaw in all neural networks. However, the latest version of the ML-assisted filter correctly recognises and filters out over 99% of random user names. Any combination of the additional filters can be selected at any time.

The script can be reverted to the initial (empty) configuration by clicking the Reset to defaults link at the lower right corner of the script settings panel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment