(url)
| 47 | var linksArr = []; |
| 48 | //迅雷、快车、旋风URL解码解密从这里开始 |
| 49 | var Decryption = function(url) { //先解密再解码 |
| 50 | if (url != '') { |
| 51 | var str = url.href, |
| 52 | sr = url.href; |
| 53 | var type = 0; |
| 54 | if (Rstr.test(str)) { |
| 55 | var str1 = str.match(Rstr); |
| 56 | var temp; |
| 57 | try{ |
| 58 | temp = utf8to16(base64decode(str1[1].replace(aff, ''))).replace(aft, ''); |
| 59 | if(!isCleanStr(temp)){ |
| 60 | temp = decode64(str1[1].replace(aff, '')).replace(aft, ''); |
| 61 | }else{ |
| 62 | type = 1; |
| 63 | } |
| 64 | }catch(e){ |
| 65 | temp = decode64(str1[1].replace(aff, '')).replace(aft, ''); |
| 66 | } |
| 67 | str = temp; |
| 68 | } else { |
| 69 | return; |
| 70 | } |
| 71 | if (str.indexOf(":") < 0) { |
| 72 | str = "http://" + str.split("|")[0]; |
| 73 | } else if (type == 0 && /[^(\w|\/|\.|\?|\=|\&|\:|\[|\])]/ig.test(str)) { |
| 74 | str = strAnsi2Unicode(str); |
| 75 | } |
| 76 | if (sr != str) { |
| 77 | url.title = '├此链接已解密┤'; |
| 78 | url.style.outline = '#f0f dashed 2px'; |
| 79 | url.href = str; |
| 80 | if(linksArr.toString().indexOf(str) == -1) |
| 81 | linksArr.push(str); |
| 82 | } |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | document.addEventListener('mouseup', function(o) { |
| 87 | if (o.button == 0 && (o.ctrlKey || o.metaKey)) { |
no test coverage detected