Advertisement
darkenvy

Untitled

Feb 26th, 2016
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         CoinBrawl ForumPlus
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  try to take over the world!
  6. // @author       You
  7. // @match        https://www.coinbrawl.com/message_threads/*
  8. // @grant        none
  9. // ==/UserScript==
  10.  
  11.  
  12. //document.body.innerHTML = document.body.innerHTML.replace('idea', '😀');
  13.  
  14.  
  15.  
  16. avatar   = '😀';
  17.  
  18.  
  19. var re = /\<h4\>\<a\shref="\/users\/(\d+)"\>.*\<\/a\>\<\/h4\>/;
  20.  
  21. function findAvatar(match, p1, p2, p3, offset, string) {
  22.     //a = userID.match(/\d+/);
  23.     a = p2 % 151;
  24.     //b = a.substring(1, a.length);
  25.    
  26.     //b = a / 151;
  27.     //c = Math.round(userID);
  28.     return a;
  29. }
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38. for(i = 0; i < 20; i++) {
  39.     //document.body.innerHTML = document.body.innerHTML.replace( re, findAvatar('$1') );
  40.     document.body.innerHTML = document.body.innerHTML.replace(re, findAvatar)
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement