// ==UserScript== // @name Go Glitch Edit Page // @namespace GoGlitchEditPage // @version 1.0.1 // @description Go Glitch Edit Page! // @author Runterya // @homepage https://github.com/Runteryaa // @match *://*.glitch.me // @match *://glitch.com/edit/#!/* // @icon https://raw.githubusercontent.com/MrEnoX/MrEnoX/main/GoGlitchEditPage.png // @grant none // @license MIT // @compatible chrome // @compatible edge // @compatible firefox // @compatible opera // @compatible safari // @downloadURL none // ==/UserScript== // Add a button to the top right corner of the page that redirects to the Glitch editor. (function() { 'use strict'; // Check if the current domain is "glitch.me" if (window.location.hostname.endsWith("glitch.me")) { // Create the GEP button var ggepButton = document.createElement('button'); ggepButton.innerHTML = 'GGEP'; ggepButton.title = 'Go Glitch Edit Page'; ggepButton.style.position = 'fixed'; ggepButton.style.top = '3px'; ggepButton.style.right = '3px'; ggepButton.style.zIndex = '9999'; ggepButton.style.fontSize = '10px'; ggepButton.style.padding = '.5px 1px'; // Add an event listener to redirect on button click ggepButton.addEventListener('click', function() { var projectName = window.location.hostname.split('.')[0]; var redirectUrl = 'https://glitch.com/edit/#!/' + projectName; window.location.href = redirectUrl; }); // Append the button to the body document.body.appendChild(ggepButton); } // Loaded console.log("Go Glitch Edit Page"); })();