This is my JavaScript bookmarklet that I constructed a few years ago to enable me to quickly add and/or re-add music tracks to Soundcloud groups. It still works, therefore I am sharing it with you all today.
What this script does is firstly deselects all groups that your track is listed in, and then lastly re-selects all the groups, in essence pushing your track in previously selected groups back to the top of the group list.
Here is the code below, simply copy and paste this code in to the URL field when adding a link to your bookmarks. (google search should help you for your browser/os combination: How to add a bookmarklet).
javascript: (function(){
var groupList=document.querySelectorAll('.addToGroup')[0].getElementsByTagName('ul')[0];
/* console.log('Deselecting all groups to re-add later'); */
for(var i=0; i < groupList.children.length;i++) {
var button=groupList.children[i].getElementsByTagName('button')[0];
if (button.className === 'addToGroupButton sc-button-blue sc-button sc-button-medium sc-button-responsive sc-button-selected') {
button.click();
}
}
function clickAll(){
/* console.log('Selecting all groups, add previously removed back to top of list'); */
for(var i=0; i < groupList.children.length;i++) {
groupList.children[i].getElementsByTagName('button')[0].click();
}
}
clickAll();
})();
Also posted on Pastebin many years ago (if you need/want the compressed JS or if this site breaks the JS in this page): http://pastebin.com/c30jPK3g
Using the bookmarklet
Note: The more groups you have joined the more PC resources needed to run the script. In some cases with older PC's you may encounter temporary web browser freezes while the script runs - if this happens just wait a minute or two (at most).
Step 1:
Click on the add to group button for your selected track (as highlighted below in red).
Step 2:
Simply click on the Soundcloud bookmarklet (as highlighted in red).
Step 3:
That's it. Repeat these steps when your track starts to fall from the top of the groups to push it back to the top.