Last active
August 29, 2015 14:15
-
-
Save thebeardphantom/14a1c2ab6d69a832f29b to your computer and use it in GitHub Desktop.
Steam Workshop Subscription Manager (SWSM)
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
javascript:(function(){ try { var version="1.1.3";var xmlHttp=null;xmlHttp=new XMLHttpRequest();xmlHttp.open("GET","https://api.github.com/gists/14a1c2ab6d69a832f29b",false);xmlHttp.send(null);var raw=xmlHttp.responseText;var json=JSON.parse(raw);if(json.files["version.txt"]["content"]!=version){prompt("There is a new version of SWSM. The latest script has been retrieved and is in the below text box. Edit your SWSM bookmarklet, replace the current URL value with the value below, and then rerun the bookmarklet.",json.files["SWSM.js"]["content"]);return;} } catch(err){} var unsubAll=false;var wl=window.location.toString();if(wl.toString().indexOf("browsefilter=mysubscriptions")==-1||wl.indexOf("steamcommunity.com")==-1){var uPrompt=prompt("Not on the correct page! Enter your steam username (not account name!). When the workshop page finishes loading, run this bookmarklet again.");if(uPrompt!=null){window.location="http://steamcommunity.com/id/"+uPrompt+"/myworkshopfiles?browsefilter=mysubscriptions&numperpage=30";}return;} alert("-=DISCLAIMER=-\n\nThe SWSM will allow you to mass-manage all CURRENTLY VISIBLE subscribed workshop items. This script will not assist you in undoing whatever you do WITH it. I take no responsibility for what you do with this. This script is provided free of charge.\n\nCreated by TheBeardPhantom");var buttons=document.querySelectorAll('*[id^=UnsubscribeItemBtn]');NextButton:for(var i=0;i<buttons.length;i++){var itemID=buttons[i].id.replace("UnsubscribeItemBtn","");if(unsubAll){UnsubscribeItem(itemID);continue NextButton;} var links=document.querySelectorAll('*[href$="'+itemID+'"]');for(var ii=0;ii<links.length;ii++){var l=links[ii];for(var iii=0;iii<l.childElementCount;iii++){var c=l.children[iii];if(c.className==="workshopItemTitle"){while(true){var action=prompt("Progress: "+(i+1)+"/"+buttons.length+"\nUnsubscribe from \""+c.innerText+"\"?\n\n1: Unsubscribe\n2: Skip\n3: Unsubscribe Rest\n\nClose this window to exit.");if(action==null){break NextButton;}else{action=action.trim();}if(action=="1"){UnsubscribeItem(itemID);continue NextButton;}else if(action=="2"){continue NextButton;}else if(action=="3"){unsubAll=true;UnsubscribeItem(itemID);continue NextButton;}}}}}} alert("Job finished. If you'd like to continue managing items, please go to the next page of subscribed items and run this bookmarklet again.");})() |
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
1.1.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create a new bookmark and use the above text as the URL!