I hereby claim:
- I am benzi on github.
- I am benzi (https://keybase.io/benzi) on keybase.
- I have a public key ASB91pSJY5vUQVsDKyAjUPKh9jEdgee6LY9thOLxMKdycwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| sudo npm cache clean -f && sudo npm install -g n && sudo n 4.1.0 && node -v |
| var client_id = ''; // Insert client ID | |
| var track_id = ''; // Insert track ID | |
| var url = 'https://api.soundcloud.com/tracks/' + track_id + '?client_id=' + client_id; | |
| var https = require('https'); | |
| https.get(url, function(res) { | |
| var json = ''; | |
| res.on('data', function(data) { |
| // Edit the url to point to your custom badge | |
| // Edit the data-cid to include your user ID | |
| var css = '[data-cid^="3851534-"] .badge-box .bdg {background: url("https://ssl.benzi.io/code/qluster/images/badges/eyes.png")!important;}', | |
| head = document.head || document.getElementsByTagName('head')[0], | |
| style = document.createElement('style'); | |
| style.type = 'text/css'; | |
| if (style.styleSheet){ |
| /* | |
| Copyright (c) 2015 by Benzi (Benzi Mooneegan) | |
| Please do not copy or modify without permission from the owner. | |
| Description: This script is used to automatically skip songs that are not available. | |
| */ | |
| function naSkip() { | |
| var format = API.getMedia().format; | |
| var cid = API.getMedia().cid; |
| (function() { | |
| var media = API.getMedia(); | |
| var linkToSong = null; | |
| if (media.format === 1) { | |
| linkToSong = "http://youtu.be/" + media.cid; | |
| console.log(linkToSong); | |
| API.chatLog(linkToSong); | |
| } | |
| if (media.format === 2) { | |
| SC.get('/tracks/' + media.cid, function (sound) { |
| (function() { | |
| if ($("#playback").is(":visible")){ | |
| $('#playback').hide(); | |
| } | |
| else { | |
| $('#playback').show(); | |
| } | |
| // Credit: Benzi (Benzi Mooneegan) |