Ok, the title may be a little confusing, but my goal is to use tampermonkey, to make a userscript that declares a function that I can use in the console every time a page (discord) loads. This is what my userscript looks like:
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://discord.com/channels/@me
// @grant none
// ==/UserScript==
(function() {
'use strict';
function alert1() {
alert();
}
})();
To clarify again, I want to put the code above into a userscript. And I want to be able to call the alert1();
from the console.