text: // ==UserScript==
  // @name         RichPresence
  // @version      1.0.5
  // @description  Sets PC Quality Rich Presence on The Web Version of Your Discord account.
  // @author       GabeTM & lexisother
  // @match        https://discord.com/*
  // @match        https://ptb.discord.com/*
  // @match        https://canary.discord.com/*
  // @match        http://blocked.com-default.ws/?oI=10428387449&type=chromium-m&url=discord.com%2Fapp
  // @match        http://blocked.com-default.ws/?oI=10428387449&type=chromium-m&url=canary.discord.com%2Fapp
  // @match        http://blocked.com-default.ws/?oI=10428387449&type=chromium-m&url=ptb.discord.com%2Fapp
  // @grant        none
  // @namespace    https://github.com/Project-Browser/RichPresence
  // @icon         https://cdn.discordapp.com/app-assets/838839458350235759/838886110008442952.png
  // ==/UserScript==
  
  // Vars
  const ID = '838839458350235759'; // head to https://discord.com/developers to make your own
  const TITLE = 'RichPresence'; // Title
  const DETAILS = 'Browsing'; // 2nd Part of The Title
  const STATE = 'Discord'; // Last Part of The Title
  const LARGE_IMAGE = 'discord'; // head to https://discord.com/developers to add your own images
  const SMALL_IMAGE = 'crp-web'; // head to https://discord.com/developers to add your own images
  const LARGE_IMAGE_TEXT = 'Vibin'; // Big Image Text
  const SMALL_IMAGE_TEXT = 'Rich Presence For Web V1.5'; // Small image text
  const BUTTON_2 = 'RichPresence'; // Button 2's Label
  const BUTTON_1 = 'Tampermonkey'; // Button 1's Label
  const URL_2 = 'https://github.com/Project-Browser/Userscripts/blob/main/RichPresence.user.js'; // URL 2's Link
  const URL_1 = 'https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo'; // URL 1's Link
  
  
  // Original Code Made By GabeTM
  // Original Code Modifed For Web By lexisother & GabeTM
  // Meta Modifed By TheRealGWJosh
  // Hosted By TheRealGWJosh
  // Icon Made By v-briese
  // Icon Modifed By TheRealGWJosh
  
  // GabeTM's Github https://github.com/GabeTM
  // lexisother's Github https://github.com/lexisother
  // TheRealGWJosh's Github https://github.com/TheRealGWJosh
  // v-briese's Github https://github.com/v-briese
  
  console.log('executed');
  
  (async () => {
      await new Promise((resolve) => setTimeout(resolve, 15000));
      const interval = setInterval(() => {
          console.log('waiting for variable');
          if (!window.hasOwnProperty('webpackJsonp')){
              console.log('NOT QUITE THERE YET');
          } else {
              console.log('variable is defined');
  
              const x = window.webpackJsonp.push([[], {'_': (a, _, b) => {
                  a.exports = b;
              }}, [['_']]]).c;
  
              for (const i in x) {
                  x[i]?.exports?.default?.SET_ACTIVITY?.handler({
                      'socket': {
                          'id': 100, // Leave This Alone
                          'application': {
                              'id': ID,
                              'name': TITLE
                          },
                          'transport': 'ipc' // Leave This Alone
                      },
                      'args': {
                          'pid': 10, // Leave This Alone
                          'activity': {
                              'details': DETAILS,
                              'state': STATE,
                              'buttons': [
                                  {
                                      'label': BUTTON_1, // Button 1
                                      'url': URL_1 // URL 1
                                  },
                                  {
                                      'label': BUTTON_2, // Button 2
                                      'url': URL_2 // URL 2
                                  }
                              ],
                              'timestamps': {
                                  'start': Date.now(), // Leave This Alone
                              },
                              'assets': {
                                  'large_image': LARGE_IMAGE,
                                  'large_text': LARGE_IMAGE_TEXT,
                                  'small_image': SMALL_IMAGE,
                                  'small_text': SMALL_IMAGE_TEXT
                              }
                          }
                      }
                  });
              }
              clearInterval(interval);
          }
      }, 5000);
  
      console.log('end of async call stack');
  })();
  