• We've moved. Our community is now at ownd.sh — latest discussions and updates live there.

[Userscript] Hide bump posts in marketplace threads [TamperMonkey]

SpaceTaco

Guest
Contributor
SpaceTaco Rep
0
0
0
Rep
739
SpaceTaco Vouches
2
0
0
Vouches
2
Posts
2,986
Likes
740
Bits
4 YEARS
4 YEARS OF SERVICE
ty

BlustBoosts.com

blustboosts.gif


Dm me for confirmation before dealing on Telegram. I don't sell anything on Telegram, and i will not contact you via telegram



Ad @Hstora exp 30/11

✅$400 ONLYFANS Balance ➜ From $15 ✅$100 ONLYFANS Balance ➜ From  $3.50 



Ad @JuliusAzrael exp 31/11
 

TomTurkey

Elite member
Elite member
TomTurkey Rep
0
0
Rep
18
TomTurkey Vouches
0
0
0
Vouches
0
Posts
84
Likes
9
Bits
6 MONTHS
6 6 MONTHS OF SERVICE
This userscript sounds like a great way to streamline your experience in marketplace threads. One thing to keep in mind is that while it hides the bump posts, it's still important to check those posts occasionally if you want to stay updated on sellers' activity or changes in their listings. It can help balance clarity with staying informed.
 

EarlHickey

Divine
Divine
EarlHickey Rep
0
0
0
Rep
1101
EarlHickey Vouches
0
0
0
Vouches
0
Posts
14,267
Likes
7,229
Bits
4 YEARS
4 YEARS OF SERVICE
Amazing contribution retired mod





 

Rapoonch

Member
Rapoonch Rep
0
0
Rep
0
Rapoonch Vouches
0
0
0
Vouches
0
Posts
36
Likes
2
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
(28 September, 2026 - 11:59 PM)Ping Wrote: Show MoreI made a small Tampermonkey userscript to make sales threads easier to read when they have pages of bump posts.

It looks for posts containing “This is a bump” and hides them from your view.

Each hidden post leaves a small placeholder with a “Show this post” button, so you can still check it if you want.

There’s also a floating toggle to show or hide all bumps on the current page, and it remembers your choice.

This is a browser-side quality-of-life tool. It doesn’t change the thread, remove anyone’s posts, or affect a seller’s ability to bump.

How to use it:

- Install Tampermonkey.

- Add the attached script.Code:

Code:
// ==UserScript==

// @name         ownd.sh — Hide Bump Posts

// @namespace    https://ownd.sh/

// @version      1.2.0

// @description  Hide posts whose message is only "This is a bump", ignoring signatures and post controls.

// @match        https://ownd.sh/Thread-*

// @match        https://www.ownd.sh/Thread-*

// @match        https://ownd.sh/showthread.php*

// @match        https://www.ownd.sh/showthread.php*

// @grant        none

// @run-at       document-idle

// ==/UserScript==

(() => {

  'use strict';

  const PHRASE = 'This is a bump';

  const STORAGE_KEY = 'cracked-hide-bumps-enabled';

  const BODY_SELECTOR = '.post_body, .postbody, .post_message, .post-content, .message, [id^="post_message_"]';

  const EXTRAS = '.signature, .post_signature, .post-signature, .edited, .post_edit, .post-edit, .post_meta, .post-meta, .post_controls, .post-controls, .post_buttons, .post-buttons, .reactions, .reaction, .likes, .likebar, .thanks, .award, .awards, .postbit_buttons, script, style';

  const processed = new WeakMap();

  let enabled = localStorage.getItem(STORAGE_KEY) !== 'false';

  let toolbar, button, countLabel, scheduled = false;

  const css = document.createElement('style');

  css.textContent = `

    .cb-toolbar { position: fixed; right: 16px; bottom: 16px; z-index: 2147483647;

      display: flex; align-items: center; gap: 8px; padding: 9px 12px;

      background: #20242b; color: #fff; border: 1px solid #78818d;

      border-radius: 8px; box-shadow: 0 3px 14px #0007; font: 13px/1.3 system-ui, sans-serif; }

    .cb-toolbar button, .cb-placeholder button { cursor: pointer; padding: 5px 9px;

      background: #3468b6; color: #fff; border: 0; border-radius: 5px; font: inherit; }

    .cb-toolbar button:focus-visible, .cb-placeholder button:focus-visible { outline: 2px solid #ffcc62; }

    .cb-hidden { display: none !important; }

    .cb-placeholder { margin: 8px 0; padding: 7px 10px; border: 1px dashed #8994a0;

      border-radius: 5px; background: #252a30; color: #fff; font: 13px/1.4 system-ui, sans-serif; }

    .cb-placeholder button { margin-left: 8px; }

  `;

  document.head.append(css);

  function messageOnly(body) {

    const copy = body.cloneNode(true);

    copy.querySelectorAll(EXTRAS).forEach(node => node.remove());

    const text = (copy.textContent || '').replace(/[\s\u200b-\u200d\ufeff]+/g, ' ').trim();

    if (text !== PHRASE) return false;

    return !copy.querySelector('img, video, audio, iframe, object, embed, svg, canvas, input, textarea, a[href]');

  }

  function findPosts() {

    const found = [];

    document.querySelectorAll('[id^="post_"]').forEach(post => {

      if (!/^post_\d+$/.test(post.id)) return;

      const bodies = [...post.querySelectorAll(BODY_SELECTOR)].filter(node => node.closest('[id^="post_"]') === post);

      // Use the deepest matching message container: outer wrappers may contain signatures and controls.

      const body = bodies.find(node => !bodies.some(other => other !== node && node.contains(other)));

      if (body && messageOnly(body)) found.push(post);

    });

    return found;

  }

  function makeToolbar() {

    toolbar = document.createElement('div');

    toolbar.className = 'cb-toolbar';

    countLabel = document.createElement('span');

    button = document.createElement('button');

    button.type = 'button';

    button.addEventListener('click', () => {

      enabled = !enabled;

      localStorage.setItem(STORAGE_KEY, String(enabled));

      update();

    });

    toolbar.append(countLabel, button);

    document.body.append(toolbar);

  }

  function addPlaceholder(post) {

    const placeholder = document.createElement('div');

    placeholder.className = 'cb-placeholder';

    placeholder.append(document.createTextNode('Bump post hidden.'));

    const reveal = document.createElement('button');

    reveal.type = 'button';

    reveal.textContent = 'Show this post';

    const state = { placeholder, revealed: false };

    reveal.addEventListener('click', () => {

      state.revealed = !state.revealed;

      post.classList.toggle('cb-hidden', enabled && !state.revealed);

      reveal.textContent = state.revealed ? 'Hide this post' : 'Show this post';

    });

    placeholder.append(reveal);

    post.before(placeholder);

    processed.set(post, state);

  }

  function update() {

    const posts = findPosts();

    document.querySelectorAll('.cb-placeholder').forEach(placeholder => {

      const post = placeholder._cbPost;

      if (!post?.isConnected || !posts.includes(post)) {

        post?.classList.remove('cb-hidden');

        placeholder.remove();

      }

    });

    posts.forEach(post => {

      if (!processed.get(post)?.placeholder.isConnected) {

        addPlaceholder(post);

        processed.get(post).placeholder._cbPost = post;

      }

      const state = processed.get(post);

      post.classList.toggle('cb-hidden', enabled && !state.revealed);

      state.placeholder.hidden = !enabled;

    });

    if (!toolbar && posts.length) makeToolbar();

    if (toolbar) {

      toolbar.hidden = posts.length === 0;

      const label = enabled ? 'Show all bumps' : 'Hide bumps';

      if (button.textContent !== label) button.textContent = label;

      button.setAttribute('aria-pressed', String(enabled));

      const count = `${posts.length} bump${posts.length === 1 ? '' : 's'} on this page`;

      if (countLabel.textContent !== count) countLabel.textContent = count;

    }

  }

  update();

  new MutationObserver(() => {

    if (scheduled) return;

    scheduled = true;

    requestAnimationFrame(() => { scheduled = false; update(); });

  }).observe(document.body, { childList: true, subtree: true });

})();

- Reload a thread and use the toggle in the bottom-right corner.

If you find a bug or have a suggestion, let me know!
PepeMusic2.gif

great code ro
sheepe.gif
 

Attachments

  • PepeMusic2.gif
    PepeMusic2.gif
    14.7 KB · Views: 0
  • sheepe.gif
    sheepe.gif
    4.5 KB · Views: 0

CDSG

Strike.pw
Divine
CDSG Rep
0
0
0
Rep
2663
CDSG Vouches
47
0
0
Vouches
47
Posts
6,677
Likes
8,245
Bits
4 YEARS
4 YEARS OF SERVICE

179,168

126,023

1,405,739

Top