Garry's Mod

Garry's Mod

36 ratings
How to add all of ur items to collection by one click!
By TheArtemMaps
Hi guys, While playing multiple save games at once, each one with its own set of workshop assets and mods, I was really annoyed by the fact that you can only add subscribed items to your collections manually. Therefore I found a script that allows you to add/remove all (up to first 1000) your subscribed workshop items into a new collection by one click. I will show you the way for Google Chrome, however, this should also work for other browsers. The steps are as following:

1. Start creating a new collection or edit a existing one

2. Save the title and the details of the collection

3. On the "Add / Edit Child Items" screen, open the developer console (Ctrl+Shift+I), then open tab "Console"

**4. Paste the following script to the console and press Enter:

setTimeout(function(){
// Create "Add" button
var btn_add = document.createElement("BUTTON");
var collection_window = document.querySelector('div.collectionAddItemsSection')
collection_window.insertBefore(btn_add,collection_window.firstChild);
btn_add.setAttribute('id','ASCM_addall');
jQuery('button#ASCM_addall').html('+')
btn_add.style.position = 'absolute';
btn_add.style.top = '110px';
btn_add.style.right = '50px';
btn_add.style['border-radius'] = '10px';
btn_add.style.color = 'white';
btn_add.style['font-size'] = '40px';
btn_add.style.background = '#00c417';
btn_add.style.width = '60px';
btn_add.style.height = '60px';
btn_add.style['text-decoration'] = 'none';
// Create "Remove" button
var btn_rem = document.createElement("BUTTON");
var collection_window = document.querySelector('div.collectionAddItemsSection')
collection_window.insertBefore(btn_rem ,collection_window.firstChild);
btn_rem .setAttribute('id','ASCM_removeall');
jQuery('button#ASCM_removeall').html('-')
btn_rem.style.position = 'absolute';
btn_rem.style.top = '110px';
btn_rem.style.right = '120px';
btn_rem.style['border-radius'] = '10px';
btn_rem.style.color = 'white';
btn_rem.style['font-size'] = '40px';
btn_rem.style.background = '#c20000';
btn_rem.style.width = '60px';
btn_rem.style.height = '60px';
btn_rem.style['text-decoration'] = 'none';
// Bind "Add" button
jQuery('button#ASCM_addall').click(function(){
var items = [];
var collection_name = jQuery('div.manageCollectionHeader div.breadcrumbs a').eq(2).text().trim();
var url = new URL(document.location.href);
var collection_id = url.searchParams.get('id');
jQuery('div#MySubscribedItems div.itemChoice:not(.inCollection)').each(function(){
var data = {
id: collection_id,
sessionid: window.g_sessionID,
childid: jQuery(this).attr('id').replace('choice_MySubscribedItems_',''),
activeSection: collection_name
};
addToCollection(data, jQuery(this));
});
});
// Bind "Remove" button
jQuery('button#ASCM_removeall').click(function(){
jQuery('div#MySubscribedItems div.itemChoice.inCollection').each(function(){
window.RemoveChildFromCollection(jQuery(this).attr('id').replace('choice_MySubscribedItems_',''))
});
});
// Function to send a request to add item to a collection
function addToCollection(data, object){
jQuery.ajax({
type: "POST",
url: 'https://steamproxy.net/sharedfiles/addchild',
data: data,
success: function(response){
if(object && response.success == 1){
object.addClass('inCollection');
}
}
});
}
}, 0);
5. This will create 2 new buttons above the table with the subscribed items. Press the green button to add all subscibed items into this collection and the red button to remove all subscribed items from this collection.

6. After you press the green button, open the "Network" tab in the developer console and wait until the last request gets a "200" response.

7. Refresh the page, your collection will be updated.

To see how it looks on the page, see the screenshot: https://imgur.com/a/w8qZ3VM

I hope that this will save some of you a lot of time :)

SOURCE IS: https://www.reddit.com/r/CitiesSkylines/comments/8hrdsd/add_all_subscribed_items_to_steam_collections_at/

works for all games!

#GABENDOSOMETHING
2
   
Award
Favorite
Favorited
Unfavorite
Secret
Secret
15 Comments
whyendee 4 Jul, 2023 @ 8:29am 
Thank you so much, will literally save me hours for cities skylines :>
TheArtemMaps  [author] 10 Sep, 2022 @ 9:53am 
depends on browser tho
Tea's Coffee 4 Sep, 2022 @ 11:04am 
its ctrl+shift+j for the windows users
NextKuromeThe76Soldier 2 Sep, 2022 @ 12:44pm 
that moment when it requires an external browser, and letalone chrome....

volvo pls fix
TheArtemMaps  [author] 31 Aug, 2022 @ 12:54am 
ur welcome =)
deceptive 31 Aug, 2022 @ 12:14am 
thank you so fucking much
Bad to the bone 28 Aug, 2022 @ 10:50am 
good now i dont have to put addons into my collection one by one in 3 hours
Wayz 28 Aug, 2022 @ 10:11am 
Thank you, fella.
TheArtemMaps  [author] 27 Aug, 2022 @ 11:47am 
work only with browser
racist 27 Aug, 2022 @ 6:53am 
none