// ==UserScript== // @name mega dl button fix // @version 0.1 // @match https://mega.nz/* // @description removes the megasync dl button and replaces it with the inline browser one // @grant none // @namespace https://greasyfork.org/users/29657 // @downloadURL none // ==/UserScript== waitForButton(); function doEverything() { msbut = document.getElementsByClassName("with-megasync")[0]; msbut.style.display = "none"; inbut = document.getElementsByClassName("throught-browser")[0]; inbut.className += " red"; } function waitForButton() { buttons = document.getElementsByClassName("throught-browser").length; if(buttons > 0) { doEverything(); } else { setTimeout(waitForButton, 500); } }