Created
March 28, 2018 01:11
-
-
Save meznak/add38a1b1ef990239cd86c098d315f39 to your computer and use it in GitHub Desktop.
Skip the obnoxious "agree" dialog when downloading from Splunkbase
This file contains hidden or 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 Splunkbase download dialog skipper | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Skip the obnoxious "agree" dialog when downloading from Splunkbase | |
// @author Nate Plamondon | |
// @match https://splunkbase.splunk.com/app/* | |
// @grant GM_setValue | |
// @run-at document-body | |
// ==/UserScript== | |
var dl_button = document.getElementsByClassName("u.hide@sm u.item:6/12@xl u.item:1/1@lg u.item:1/1@md u.btn:green")[0]; | |
var dl_path = dl_button.getAttribute("sb-href"); | |
var new_button = document.createElement("div"); | |
new_button.className = "u.item:6/12@xl u.item:1/1@lg u.item:1/1@md u.btn:green"; | |
new_button.innerHTML = "<a href='" + dl_path + "'>Get it!</a>"; | |
dl_button.parentNode.replaceChild(new_button, dl_button); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment