Forked from ErkHal/Thingiverse speed downloader.user.js
Last active
March 1, 2022 18:52
-
-
Save idle-user/dd9ce552bf64bdc3e3b51703ceab389d to your computer and use it in GitHub Desktop.
TamperMonkey script that allows you to download Thingiverse files without the pop-up and 5 second wait time.
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 speed downloader | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description Just straight up download the .zip and not having to wait for 5 secs or be stopped by anti-adblock. Thanks to Deses for reporting a bug in the script and suggesting fixes ! | |
// @author ErkHal | |
// @include https://www.thingiverse.com/thing:* | |
// @exclude https://www.thingiverse.com/thing:*/edit* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js | |
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js | |
// @grant none | |
// ==/UserScript== | |
waitForKeyElements ("div.ThingPage__sidebar--6ZDYI > div.SidebarMenu__sidebarMenu--3uBjd > div.SidebarMenu__sideMenuTop--3xCYh > div > a", noBullshit); | |
function noBullshit() { | |
'use strict'; | |
const downloadElement = document.querySelector('div.ThingPage__sidebar--6ZDYI > div.SidebarMenu__sidebarMenu--3uBjd > div.SidebarMenu__sideMenuTop--3xCYh > div > a'); | |
var URL = window.location.href; | |
//Checking if we're on the Details tab or somewhere else | |
if(URL.split("/").length - 1 > 3) { | |
URL = URL.substring(0, URL.lastIndexOf("/")); | |
} | |
downloadElement.href = URL + '/zip' | |
downloadElement.innerHTML = '<div class="button button-primary">DOWNLOAD</div>' | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment