Skip to content

Instantly share code, notes, and snippets.

@FelixWolf
Created August 7, 2014 16:30
Show Gist options
  • Save FelixWolf/fff1185722446263ce06 to your computer and use it in GitHub Desktop.
Save FelixWolf/fff1185722446263ce06 to your computer and use it in GitHub Desktop.
Steam I know what I am doing I'm not an idiot who clicks staemcummunety.9001webhosting.co links.
// ==UserScript==
// @name Félix
// @namespace http://felix.wolf.it.cx/data/steampls.js
// @version 0.1
// @description Gets rid of the "link filter" on steam
// @match https://steamcommunity.com/linkfilter/?url=*
// @copyright CC0, made by Félix, I'd appreciate it if you didn't claim it as your own, but w/e.
// ==/UserScript==
var usePhishCheck=true;
var phishCheckServer = "http://felix.wolf.it.cx/data/phishcheck";
//This was my first attempt, it worked but steam does not escape URLs, so it defeats the purpose of parsing urls.
/*
location.search.substr(1).split("&").forEach(function(v,k){
var entry = v.split("="), key = entry.shift(), value=entry.join("=");
if(key=="url")
document.location=value;
});*/
//This works, also checks against some phishing lists
var theUrl = document.getElementById("proceedButton").getAttribute("href");
if(usePhishCheck){
var req = new XMLHttpRequest();
req.addEventListener("readystatechange",function(){
if(req.readyState==4){
var res = JSON.parse(req.responseText);
if(res.isSafe==true){
document.location=theUrl;
}else{
if(confirm(res.warning)){
document.location=theUrl;
}
}
}
});
req.open("POST", phishCheckServer+"?"+Math.random(), true);
req.send(theUrl);
}else{
document.location=theUrl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment