Last active
June 13, 2017 15:15
-
-
Save quer/15ef050cb2fe64601593d3bcf0fc864e to your computer and use it in GitHub Desktop.
a tool to remove all steam guide, you have created. to remove all from a sinkle you are on
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 remove guide | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match http://steamcommunity.com/id/*/myworkshopfiles/?section=guides* | |
// @require http://code.jquery.com/jquery-1.12.4.min.js | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var ider = []; | |
var list = $(".workshopItemCollectionContainer"); | |
list.each(function( index ) { | |
var element = $(this).find(".workshopItemCollection")[0]; | |
var id = $(element).attr("href").replace("http://steamcommunity.com/sharedfiles/filedetails/?id=", ""); | |
if(id != "923012519"){ | |
$(element).css("background", "blue"); | |
ider.push(id); | |
} | |
}); | |
$(".rightDetailsBlock").append("<button id='removeAllGuides'>remove allguides</button>"); | |
$("body").on("click", "#removeAllGuides", function(){ | |
test(0); | |
}); | |
function test(index) { | |
if (index < ider.length) { | |
var id = ider[index]; | |
$.post('http://steamcommunity.com/sharedfiles/delete', {id:id, appid:753, sessionid: g_sessionID, file_type:9}, function(response) { | |
// Log the response to the console | |
console.log("Response: "+response); | |
test(++index); | |
}); | |
}else{ | |
alert("reload"); | |
return; | |
} | |
} | |
/*test(0, function () { | |
console.log("done"); | |
});*/ | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment