Skip to content

Instantly share code, notes, and snippets.

@ccbikai
Created June 13, 2014 06:06
Show Gist options
  • Save ccbikai/72b46a2170fe52cdfc05 to your computer and use it in GitHub Desktop.
Save ccbikai/72b46a2170fe52cdfc05 to your computer and use it in GitHub Desktop.
虾米外链破解JS脚本
SongUrl = (function (sLocation) {
var num = Number(sLocation.charAt(0)),
inp = sLocation.substr(1),
iLe = inp.length % num,
a = 0,
ret = '',
arr = [];
for (var i = 0; i < num; i++) {
arr[i] = (iLe > i ? 1 : 0) + (inp.length - iLe) / num;
}
for (var z = 0; z < arr[1]; z++) {
a = 0;
for (var j = 0; j < num; j++) {
ret += inp.charAt(a + z);
a += arr[j];
}
}
return unescape(ret.substr(0, inp.length)).replace(/\^/g, '0').replace(/\+/g, ' ');
})(SongUrl);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment