Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         disadvert
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  try to take over the world!
  6. // @author       You
  7. // @match        https://discordapp.com/*
  8. // @include      https://ask.fm/
  9. // @grant        GM.setClipboard
  10. // @grant        GM.xmlHttpRequest
  11. // ==/UserScript==
  12.  
  13. (function() {
  14.     'use strict';
  15.     var slink = 'https://discord.gg/jQrfC8K';
  16.     var tlink = 'https://discordapp.com/invite/' + slink.split('/')[3];
  17.     var clink = 'https://discordapp.com/channels/242754614292643840/254922480739811328';
  18.     var page = location.pathname;
  19.     var hostname = location.href.split('/')[2];
  20.     switch (hostname) {
  21.         case 'discordapp.com':
  22.             disreg();
  23.             break;
  24.         case 'ask.fm':
  25.             stealme();
  26.             break;
  27.     }
  28.     function disreg() {
  29.         var wReg = setInterval(function() {
  30.             if (document.body.innerHTML.includes('Create an account')) {
  31.                 document.querySelector('input[name="email"]').focus();
  32.                 GM.setClipboard('"regme"');
  33.                 clearInterval(wReg);
  34.             }
  35.         }, 100);
  36.         var finishprof = setInterval(function() {
  37.             if (typeof document.querySelector('button[class*="btnDefault"]') != 'undefined') {
  38.                 document.querySelector('button[class*="btnDefault"]').click();
  39.                 document.querySelector('button[aria-label="User Settings"]').click();
  40.                 document.querySelector('button[class*="userInfoViewingButton"]').click();
  41.                 GM.setClipboard('"upload"');
  42.                 setTimeout(function() {
  43.                     location.href = slink;
  44.                 }, 10000);
  45.                 clearInterval(finishprof);
  46.             }
  47.         }, 100);
  48.     }
  49.     if (location.href == clink) {
  50.         var vhinter = setInterval(function() {
  51.             if (document.querySelector('svg[name="Nova_Pin"]')) {
  52.                 GM.setClipboard('"recordme"');
  53.                 clearInterval(vhinter);
  54.             }
  55.         }, 100);
  56.     }
  57.     if (location.href == tlink) {
  58.         var jinter = setInterval(function() {
  59.             if (typeof document.querySelectorAll('button')[0] != 'undefined') {
  60.                 document.querySelectorAll('button')[0].click();
  61.                 location.href = clink;
  62.                 GM.setClipboard('"cancelMe"');
  63.                 clearInterval(jinter);
  64.             }
  65.         }, 100);
  66.     }
  67.     var sinter = setInterval(function() {
  68.         if (document.body.innerHTML.includes('Continue to Discord')) {
  69.             location.href = clink;
  70.             clearInterval(sinter);
  71.         }
  72.     }, 100);
  73.     function stealme() {
  74.         GM.xmlHttpRequest({
  75.             method: "GET",
  76.             url: "https://www.ask.fm/",
  77.             onload: function(response) {
  78.                 var doc = new DOMParser().parseFromString(response.responseText, 'text/html');
  79.                 var uchunk = doc.querySelector('a[style*="background-image:url"]');
  80.                 var upic = uchunk.outerHTML.split('(')[1].split(')')[0]
  81.                 var uname = uchunk.href.split('/')[3];
  82.                 chooseProf(uname, upic);
  83.             }
  84.         });
  85.     }
  86.     function chooseProf(uname, upic) {
  87.         document.head.innerHTML = '';
  88.         var phtml = '<center><h1>Name: ' + uname + '<br><br><img src="' + upic + '"><br><br>';
  89.         var ahtml = '<button id="reload">reload</button>   <button id="pickme">use this</button>';
  90.         document.body.innerHTML = phtml + ahtml;
  91.         document.getElementById('reload').addEventListener('click', function() {
  92.             stealme();
  93.         });
  94.         document.getElementById('pickme').addEventListener('click', function() {
  95.             GM.setClipboard('profile:' + uname + ',' + upic);
  96.             setTimeout(function() { location.href = 'https://discordapp.com/register'; }, 1000);
  97.         });
  98.     }
  99. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement