Remove Reddit Collectible Expression Message

Removes the annoying Collectible Expression message that is displayed to old.reddit users.

  1. // ==UserScript==
  2. // @name Remove Reddit Collectible Expression Message
  3. // @namespace http://tampermonkey.net/
  4. // @version 2023-12-27.1
  5. // @description Removes the annoying Collectible Expression message that is displayed to old.reddit users.
  6. // @author Infi
  7. // @match https://www.reddit.com/r/*/comments/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=reddit.com
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. var searchText = 'This comment contains a Collectible Expression, which are not available on old Reddit.';
  17. var comments = document.getElementsByClassName('usertext-body');
  18.  
  19. for (var comment of comments) {
  20. var texts = comment.querySelectorAll('.md > p');
  21.  
  22. for (var text of texts) {
  23. if (text.textContent.includes(searchText)) {
  24. text.textContent = text.textContent.replace(searchText, '');
  25. }
  26. }
  27. }
  28. })();