show only download button and try click
当前为
// ==UserScript==
// @name Devuplads Remove Bloat
// @namespace https://greasyfork.org/users/821661
// @match https://devuploads.com/*
// @match https://thecubexguide.com/*
// @match https://djxmaza.in/*
// @match https://jytechs.in/*
// @match https://dev.miuiflash.com/*
// @grant GM_addStyle
// @run-at document-start
// @version 1.1.8
// @author hdyzen
// @license MIT
// @description show only download button and try click
// ==/UserScript==
'use strict';
// Set false if dont want auto click in "Generate" and "Link Generated" button
const autoClick = true;
const exposeDownloadUrl = true;
Element.prototype.clickAfter = function (ms) {
setTimeout(e => {
this.click();
}, ms);
};
if (location.hostname === 'devuploads.com') {
GM_addStyle(`
body:not(:has(#container)) {
background-color: #131316 !important;
}
body {
overflow: hidden;
& .shadow-lg {
box-shadow: none !important;
}
}
#folders_paging {
display: none !important;
}
#container {
max-width: unset !important;
position: fixed !important;
inset: 0 !important;
display: flex !important;
flex-direction: column !important;
justify-content: center !important;
align-items: center !important;
background-color: #131316 !important;
margin: 0 !important;
z-index: 214748364 !important;
& .filesof {
color: #8f91a3 !important;
}
& .bg-white {
background-color: #1b1b1f !important;
}
& .form-control,
& .paging {
background-color: inherit !important;
color: #cccee7;
&::placeholder {
color: #8f91a3;
}
}
& .border-bottom {
border-color: #1b1b1f !important;
}
& .title a {
color: #cccee7 !important;
}
& i.fas {
background: #bac3ff;
background-clip: text;
}
& .fa-magnifying-glass {
color: #bac3ff !important;
}
}
`);
} else {
GM_addStyle(`
html {
overflow: hidden !important;
}
ins {
translate: 900vw;
}
div.download-btn, :is(#downloadNow, #plzwait, #adBlocked, #Blocked):is([style*='display: block'], [style*='display:block']) {
position: fixed !important;
inset: 0 !important;
z-index: 9999 !important;
max-width: 100% !important;
margin: 0 !important;
display: flex !important;
justify-content: center !important;
align-items: center !important;
flex-direction: column !important;
background-color: #131316 !important;
transition: .2s ease;
& > button,
& > .btn {
width: 400px !important;
background: #34343c !important;
background-image: unset !important;
border: none !important;
&:hover {
filter: brightness(1.1);
}
}
&:is(#downloadNow) b {
color: #89ec7b !important;
}
&:is(#adBlocked, #Blocked) b {
color: #ff0707 !important;
}
& > #downloadbtnf {
background: #3a4ea6 !important;
}
& > #downloadbtn {
background: #3a4ea6 !important;
&[disabled] {
background: #283673 !important;
}
}
& > button[onclick*="premium"] {
background: #1e835a !important;
}
}
`);
const observer = new MutationObserver(mutations => {
const script = document.querySelector('script[disable-devtool-auto]');
if (script) script.remove();
const generate = document.querySelector(':is(#downloadbtnf, #downloadbtn)[style*="block"]');
if (generate && autoClick) generate.clickAfter(1000);
const scriptsWithDUrl = document.querySelector('center > script:last-of-type');
const urlDownload = scriptsWithDUrl?.textContent.match(/window\.location\s=\s"(.*?)"/)?.[1];
if (exposeDownloadUrl && scriptsWithDUrl && urlDownload) {
document.getElementById('dlbtn').href = urlDownload;
}
});
observer.observe(document, { childList: true, subtree: true, attributeFilter: ['style'] });
}