Skip to content

Instantly share code, notes, and snippets.

@tnraro
Last active February 24, 2022 06:23
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 tnraro/e42d358dcaf9d871965f2638145089f9 to your computer and use it in GitHub Desktop.
Save tnraro/e42d358dcaf9d871965f2638145089f9 to your computer and use it in GitHub Desktop.
// ==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