Skip to content

Instantly share code, notes, and snippets.

@novacrazy

novacrazy/fix.js Secret

Last active April 3, 2018 01:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save novacrazy/0fcba16b058a8909fe8530411c7c532b to your computer and use it in GitHub Desktop.
Save novacrazy/0fcba16b058a8909fe8530411c7c532b to your computer and use it in GitHub Desktop.
Derpibooru Download Fix (Greasemonkey/ViolentMonkey Script)
// ==UserScript==
// @name Derpibooru Download Fix
// @namespace Violentmonkey Scripts
// @match *://derpibooru.org/*
// @description Restores Derpibooru download button
// @author novacrazy
// @version 0.0.1
// @license MIT
// @grant none
// @run-at document-end
// ==/UserScript==
(function() {
for(let e of document.getElementsByClassName("image-metabar")) {
e.style.setProperty("width", "100%", "important");
e.style.setProperty("max-width", "100%", "important");
}
for(let e of document.getElementsByClassName("flex--spaced-out")) {
e.style.setProperty("justify-content", "normal", "important");
}
for(let dropdown of document.getElementsByClassName("dropdown block__header__dropdown-tab")) {
if(dropdown.children[0].title.includes("Download")) {
dropdown.innerHTML = `<div><a href=${dropdown.children[0].href}><i class="fa fa-download"></i> Download</a></div>`;
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment