Soundcloud hacking: Promote to all joined groups quickly - 1-Click JavaScript Bookmarklet

in #hacking8 years ago (edited)

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.

Sort:  

What thats sick all this time that's been there. So how many groups can I join and post to devnull? Max props upvoted.

The script has no real limit, it simply loops over all the groups that you have joined, so the limit is with Soundcloud and how many groups they let you join - I don't know the answer to that, sorry. In the example shown there are 50 groups.

There is one thing to note though (which I will add to the original post). The more groups you have joined the more resources your PC needs to run the script (it was a quick hack-n-slash job so slightly inefficient) - in some cases on older machines this can cause a temporary browser freeze - if this happens the best thing to do is wait a couple of minutes (at most) to let it run.

Thanks for your interest and support.

Thanks! The only other part I'm having a problem with is saving it as a bookmarklet in my browser (Firefox). Can you give me a quick walk through for doing that? Thanks!

Firstly you need to enable the bookmarks toolbar.
See here: https://support.mozilla.org/en-US/kb/customize-firefox-controls-buttons-and-toolbars and scroll down (near the bottom) to find the section "To turn on the Menu bar or Bookmarks toolbar"

Once the Bookmarks toolbar is enabled, right mouse click anywhere (where there's empty space) within the new toolbar and choose "New Bookmark". Give it a name, and in the location field paste the JS code from here. Click add. It should show up as the name you have chosen with the default icon of a globe. Then follow the instructions in this post to use the tool.

Cheers.

Cheers! That works! Now just to find out how many groups I can join. I read somewhere that the limit was 75 only according to something I found here https://www.soundcloudcommunity.com/soundcloud/topics/i-get-suspended-from-time-to-time-for-posting-to-too-many-groups-how-do-i-know-the-limit-is

If that is the case then this might not even really be needed. Will still come in handy though cheers!

Thank you, much appreciated.

Coin Marketplace

STEEM 0.25
TRX 0.21
JST 0.036
BTC 97583.14
ETH 3481.73
USDT 1.00
SBD 3.45