Last active
August 29, 2015 14:05
-
-
Save Lense/63cd54e66c82887718d3 to your computer and use it in GitHub Desktop.
Userscript to automate Steam linkfilter
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 Automate Steam linkfilter | |
// @namespace https://github.com/lense | |
// @description Skip the Steam link filter on trusted domains | |
// @include https://steamcommunity.com/linkfilter/?url=* | |
// @version 1 | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== | |
// Add the Domains you want to be auto-allowed here: | |
var allowedURLs = new Set(["puu.sh", "tf2r.com", "gist.github.com"]) | |
var filteredURL = window.location.search.substr(5) | |
var filteredDomain = filteredURL.match("^https?://([^/]*)")[1] | |
console.log("Testing:", filteredDomain, "in") | |
console.log(allowedURLs) | |
if(allowedURLs.has(filteredDomain)) { | |
console.log("Domain is allowed. Redirecting to", filteredURL) | |
window.location.replace(filteredURL) | |
} else { | |
console.log("Domain is not expressly allowed. You're going to have to click that button yourself.") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
WHOOPS. Fixed vuln where it would redirect httpS://badwebsite.obscuretld/http://puu.sh