Advertisement
Guest User

AnonBU: Dreamwidth edition

a guest
Dec 8th, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         All Dreamwidth Anonymous Are ANBU
  3. // @namespace    http://tampermonkey.net/
  4. // @version      1.0
  5. // @description  Turns Anonymous posters into ANBU <randomly chosen animal>
  6. // @author       MeatcarpetPrincess
  7. // @match        https://*.dreamwidth.org/*
  8. // @grant        none
  9. // ==/UserScript==
  10. //
  11. //
  12.  
  13. function capitalizeFirstLetter(string) {
  14.     return string.charAt(0).toUpperCase() + string.slice(1);
  15. }
  16.  
  17.  
  18. var animals = ['alligator', 'anteater', 'armadillo', 'auroch', 'axolotl', 'badger',
  19.                'bat', 'bear', 'beaver', 'blobfish', 'buffalo', 'camel', 'chameleon',
  20.                'cheetah', 'chipmunk', 'chinchilla', 'chupacabra', 'cormorant', 'coyote',
  21.                'crow', 'dingo', 'dinosaur', 'dog', 'dolphin', 'dragon', 'duck', 'dumbo octopus',
  22.                'elephant', 'ferret', 'fox', 'frog', 'giraffe', 'goose', 'gopher', 'grizzly',
  23.                'hamster', 'hedgehog', 'hippo', 'hyena', 'jackal', 'jackalope', 'ibex',
  24.                'ifrit', 'iguana', 'kangaroo', 'kiwi', 'koala', 'kraken', 'lemur',
  25.                'leopard', 'liger', 'lion', 'llama', 'manatee', 'mink', 'monkey',
  26.                'moose', 'narwhal', 'nyan cat', 'orangutan', 'otter', 'panda', 'penguin',
  27.                'platypus', 'python', 'pumpkin', 'quagga', 'quokka', 'rabbit', 'raccoon',
  28.                'rhino', 'sheep', 'shrew', 'skunk', 'slow loris', 'squirrel', 'tiger',
  29.                'turtle', 'unicorn', 'walrus', 'wolf', 'wolverine', 'wombat']
  30.  
  31. var special = document.querySelectorAll( "span.anonymous" );
  32. special.forEach(function (currentValue, currentIndex, listObj){
  33.     currentValue.innerText = "(ANBU " + capitalizeFirstLetter(animals[Math.floor((Math.random() * animals.length - 1) + 0)]) + ")";
  34. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement