Skip to content

Instantly share code, notes, and snippets.

@quer
Last active June 13, 2017 15:15
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 quer/15ef050cb2fe64601593d3bcf0fc864e to your computer and use it in GitHub Desktop.
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
// ==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