Skip to content

Instantly share code, notes, and snippets.

@RollingHog
Created February 17, 2025 00:01
Show Gist options
  • Save RollingHog/51e930094d16a565087dbd03e3a8ec5a to your computer and use it in GitHub Desktop.
Save RollingHog/51e930094d16a565087dbd03e3a8ec5a to your computer and use it in GitHub Desktop.

Revisions

  1. RollingHog created this gist Feb 17, 2025.
    19 changes: 19 additions & 0 deletions highlight_OP_2ch.tm.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    // ==UserScript==
    // @name highlight OP and Anon in wr
    // @namespace http://tampermonkey.net/
    // @version 2025-02-11
    // @description
    // @author You
    // @include https://2ch.hk/wr*
    // @include https://2ch.life/wr*
    // @grant none
    // @run-at document-body
    // ==/UserScript==

    (function() {
    'use strict';

    const arr = Array.from(document.querySelectorAll('.post__anon'))
    arr.filter(el => el.textContent == 'Аноним').forEach(el => el.parentNode.parentNode.parentNode.style.borderLeft = '2px solid yellow')
    arr.filter(el => el.textContent == 'ОП').forEach(el => el.parentNode.parentNode.parentNode.style.borderLeft = '2px solid red')
    })();