Advertisement
AHOHNMYC

Untitled

May 2nd, 2019
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         PANDEMONIUM
  3. // @namespace    REGNAT
  4. // @version      SATANI
  5. // @description  VITAE
  6. // @match        anon.fm/feedback*
  7. // @match        alcxemuct.accountant/feedback*
  8. // @match        https://anon.fm/feedback*
  9. // @match        https://alcxemuct.accountant/feedback*
  10. // @grant        none
  11. // ==/UserScript==
  12.  
  13. document.body.style.background = '#eee'
  14.  
  15. const i = document.getElementsByTagName`img`[0];
  16. const ca = document.createElement`canvas`;
  17. [ca.width, ca.height] = [164, 62];
  18. const c = ca.getContext`2d`;
  19. i.addEventListener('load', doStuff);
  20.  
  21. i.style.backgroundColor = '#fff';
  22. //i.style.padding = '10px';
  23.  
  24. function doStuff() {
  25.     const rx = Math.random()*ca.width |0 ;
  26.     const ry = Math.random()*ca.height |0;
  27.     const mrx = -ca.width+rx;
  28.     const mry = -ca.height+ry;
  29.     c.drawImage(i, rx, ry);
  30.     c.drawImage(i, mrx, ry);
  31.     c.drawImage(i, rx, mry);
  32.     c.drawImage(i, mrx, mry);
  33.     document.body.style.backgroundImage = `url(${ca.toDataURL()})` //d
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement