Commie Scum

Detects names of virulent communist figures.

当前为 2023-06-01 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Commie Scum
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @license MIT
  6. // @description Detects names of virulent communist figures.
  7. // @author Chadbertarian
  8. // @match https://greasyfork.org/en/script_versions
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=greasyfork.org
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. fetch('https://api.jsonbin.io/v3/b/64790b608e4aa6225ea7d02e')
  14. .then(response => response.json())
  15. .then(data => {
  16. const jsonFile = data.record;
  17. const revolutionaries = jsonFile.revolutionaries;
  18.  
  19. const revolutionary = revolutionaries.map(revolutionary => { return revolutionary.name });
  20. const regex = new RegExp(revolutionary.join('|', 'gi'));
  21. document.body.innerHTML = document.body.innerHTML.replace(regex, 'Commie Scum $&');
  22. })
  23. .catch(err => {
  24. console.log(err);
  25. });