Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name disadvert
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description try to take over the world!
- // @author You
- // @match https://discordapp.com/*
- // @include https://ask.fm/
- // @grant GM.setClipboard
- // @grant GM.xmlHttpRequest
- // ==/UserScript==
- (function() {
- 'use strict';
- var slink = 'https://discord.gg/jQrfC8K';
- var tlink = 'https://discordapp.com/invite/' + slink.split('/')[3];
- var clink = 'https://discordapp.com/channels/242754614292643840/254922480739811328';
- var page = location.pathname;
- var hostname = location.href.split('/')[2];
- switch (hostname) {
- case 'discordapp.com':
- disreg();
- break;
- case 'ask.fm':
- stealme();
- break;
- }
- function disreg() {
- var wReg = setInterval(function() {
- if (document.body.innerHTML.includes('Create an account')) {
- document.querySelector('input[name="email"]').focus();
- GM.setClipboard('"regme"');
- clearInterval(wReg);
- }
- }, 100);
- var finishprof = setInterval(function() {
- if (typeof document.querySelector('button[class*="btnDefault"]') != 'undefined') {
- document.querySelector('button[class*="btnDefault"]').click();
- document.querySelector('button[aria-label="User Settings"]').click();
- document.querySelector('button[class*="userInfoViewingButton"]').click();
- GM.setClipboard('"upload"');
- setTimeout(function() {
- location.href = slink;
- }, 10000);
- clearInterval(finishprof);
- }
- }, 100);
- }
- if (location.href == clink) {
- var vhinter = setInterval(function() {
- if (document.querySelector('svg[name="Nova_Pin"]')) {
- GM.setClipboard('"recordme"');
- clearInterval(vhinter);
- }
- }, 100);
- }
- if (location.href == tlink) {
- var jinter = setInterval(function() {
- if (typeof document.querySelectorAll('button')[0] != 'undefined') {
- document.querySelectorAll('button')[0].click();
- location.href = clink;
- GM.setClipboard('"cancelMe"');
- clearInterval(jinter);
- }
- }, 100);
- }
- var sinter = setInterval(function() {
- if (document.body.innerHTML.includes('Continue to Discord')) {
- location.href = clink;
- clearInterval(sinter);
- }
- }, 100);
- function stealme() {
- GM.xmlHttpRequest({
- method: "GET",
- url: "https://www.ask.fm/",
- onload: function(response) {
- var doc = new DOMParser().parseFromString(response.responseText, 'text/html');
- var uchunk = doc.querySelector('a[style*="background-image:url"]');
- var upic = uchunk.outerHTML.split('(')[1].split(')')[0]
- var uname = uchunk.href.split('/')[3];
- chooseProf(uname, upic);
- }
- });
- }
- function chooseProf(uname, upic) {
- document.head.innerHTML = '';
- var phtml = '<center><h1>Name: ' + uname + '<br><br><img src="' + upic + '"><br><br>';
- var ahtml = '<button id="reload">reload</button> <button id="pickme">use this</button>';
- document.body.innerHTML = phtml + ahtml;
- document.getElementById('reload').addEventListener('click', function() {
- stealme();
- });
- document.getElementById('pickme').addEventListener('click', function() {
- GM.setClipboard('profile:' + uname + ',' + upic);
- setTimeout(function() { location.href = 'https://discordapp.com/register'; }, 1000);
- });
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement