https://www.v2ex.com/t/471332#reply29 原帖 因为算法内容太多,所以只保留小部分
if (1 === o) { var D = N.length, j = 0; D && (j = N.charCodeAt(D - 1)), j<=8 && (N = N.substring(0, D - j)) }
N ==decodeURIComponent(escape(N)) } return N }
/home/shenjianlin/js/code.js:42 N ==decodeURIComponent(escape(N)) ^
URIError: URI malformed at decodeURIComponent (native) at a (/home/shenjianlin/js/code.js:42:6) at n (/home/shenjianlin/js/code.js:57:19) at Object.<anonymous> (/home/shenjianlin/js/code.js:64:13) at Module._compile (module.js:577:32) at Object.Module._extensions..js (module.js:586:10) at Module.load (module.js:494:32) at tryModuleLoad (module.js:453:12) at Function.Module._load (module.js:445:3) at Module.runMain (module.js:611:10)
1
skinny 2018-07-22 09:20:32 +08:00
你应该好好学英语。
|
2
airdge 2018-07-22 20:38:49 +08:00
atob 换成这个
function atob(a) { var b, c, e, d, f, g = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1]; d = a.length; e = 0; for (f = ""; e < d;) { do b = g[a.charCodeAt(e++) & 255]; while (e < d && -1 == b); if (-1 == b) break; do c = g[a.charCodeAt(e++) & 255]; while (e < d && -1 == c); if (-1 == c) break; f += String.fromCharCode(b << 2 | (c & 48) >> 4); do { b = a.charCodeAt(e++) & 255; if (61 == b) return f; b = g[b] } while (e < d && -1 == b); if (-1 == b) break; f += String.fromCharCode((c & 15) << 4 | (b & 60) >> 2); do { c = a.charCodeAt(e++) & 255; if (61 == c) return f; c = g[c] } while (e < d && -1 == c); if (-1 == c) break; f += String.fromCharCode((b & 3) << 6 | c) } return f } |