Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name PANDEMONIUM
- // @namespace REGNAT
- // @description SATANI
- // @version VITAE !
- // @include https://anon.fm/feedback*
- // @include https://alcxemuct.accountant/feedback*
- // @grant none
- // ==/UserScript==
- document.body.style.background = '#eee';
- const i = document.getElementsByTagName`img`[0];
- const ca = document.createElement`canvas`;
- [ca.width, ca.height] = [164, 62];
- const c = ca.getContext`2d`;
- i.addEventListener('load', onCaptchaLoaded);
- i.style.backgroundColor = '#fff';
- function onCaptchaLoaded() {
- drawShiftedImage(i);
- }
- function drawShiftedImage(image, xMaxShift = ca.width, yMaxShift = ca.height, clean = false) {
- const rx = Math.random()*xMaxShift -(200-ca.width) |0;
- const ry = Math.random()*yMaxShift -(70-ca.height) |0;
- const mrx = -ca.width +rx;
- const mry = -ca.height+ry;
- console.log(mrx, mry)
- if (clean)
- c.clearRect(0, 0, ca.width, ca.height)
- c.drawImage(image, rx, ry);
- c.drawImage(image, mrx, ry);
- c.drawImage(image, rx, mry);
- c.drawImage(image, mrx, mry);
- document.body.style.backgroundImage = `url(${ca.toDataURL()})`
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement