Last active
February 24, 2022 06:23
-
-
Save tnraro/e42d358dcaf9d871965f2638145089f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name thingiverse dl | |
// @namespace http://tnraro.com/ | |
// @version 0.1 | |
// @author tnRaro | |
// @match https://www.thingiverse.com/thing:*/files | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const render = () => { | |
const $header = document.querySelector('[class*="ThingFilesListHeader__header"]'); | |
if ($header == null) { | |
setTimeout(render, 100); | |
return; | |
} | |
$header.style.alignItems = "center"; | |
const $download = document.createElement("a"); | |
$download.href = `${location.href.replace(/files$/, "")}zip`; | |
$download.textContent = "Download All Files" | |
$header.append($download); | |
} | |
window.addEventListener("load", render); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment