Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Skip the obnoxious "agree" dialog when downloading from Splunkbase
// ==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