Skip to content

Instantly share code, notes, and snippets.

@meznak
Created March 28, 2018 01:11
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 meznak/add38a1b1ef990239cd86c098d315f39 to your computer and use it in GitHub Desktop.
Save meznak/add38a1b1ef990239cd86c098d315f39 to your computer and use it in GitHub Desktop.
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