|
49 | 49 | // @include http*://htai.* |
50 | 50 | // @include http*://gmgard.com/* |
51 | 51 | // @include http*://*.gmgard.com/* |
52 | | -// @version 3.20.49 |
| 52 | +// @version 3.20.50 |
53 | 53 | // @grant GM_notification |
54 | 54 | // @grant GM_xmlhttpRequest |
55 | 55 | // @run-at document-end |
56 | | -// @require https://greasyfork.org/scripts/23522/code/od.js?version=159126 |
| 56 | +// @require https://greasyfork.org/scripts/23522/code/od.js?version=159140 |
57 | 57 | // @require https://cdn.jsdelivr.net/crypto-js/3.1.2/components/core-min.js |
58 | 58 | // @require https://cdn.jsdelivr.net/crypto-js/3.1.2/rollups/aes.js |
59 | 59 | // @license MIT License |
|
191 | 191 | }, |
192 | 192 | { |
193 | 193 | name:"acgzone", |
194 | | - url:"http://www.uraban.me/", |
| 194 | + url:"http://www.uraban.me/wp/", |
195 | 195 | regex:/acgzone\.org|uraban\.me/, |
196 | 196 | contentArea:'article' |
197 | 197 | }, |
|
717 | 717 | }; |
718 | 718 | var oD_text=document.createElement("input"); |
719 | 719 | oD_text.type="text"; |
720 | | - oD_text.style.cssText="width:168px;height:33px;position:relative;margin-top: 0px;padding: 0px;"; |
721 | | - oD_text.placeholder="输入hash值"; |
| 720 | + oD_text.style.cssText="width:168px;height:33px;position:relative;margin-top:0px;padding:0px;box-sizing:border-box;"; |
| 721 | + oD_text.placeholder="输入hash值、网盘或下载地址"; |
722 | 722 | oD_text.title='将自动添加"magnet:?xt=urn:btih:"并去除非法字符'; |
723 | 723 | var oD_button=document.createElement("button"); |
724 | 724 | oD_button.type="button"; |
725 | 725 | oD_button.textContent="开车"; |
726 | 726 | oD_button.style.cssText="padding:4px 0;position: absolute;top:-1px;right:0px;width:40px;height:35px"; |
727 | 727 | oD_button.onclick=function (){ |
728 | | - var oD_hash=oD_text.value.replace(/(\[.*\])|[\W_]/g,""); |
| 728 | + var oD_hash=oD_text.value; |
729 | 729 | if(oD_hash===""){ |
730 | | - alert("请输入hash值"); |
731 | | - return; |
732 | | - }else if(!regObj.btih.test(oD_hash)){ |
733 | | - alert("hash值格式错误"); |
734 | | - return; |
| 730 | + alert("请输入hash值、网盘或下载地址"); |
| 731 | + }else if(/\b1[0-9a-z]{6,7}/i.test(oD_hash)){ |
| 732 | + var panMatch=oD_hash.match(/\b1[0-9a-z]{6,7}/i); |
| 733 | + var ecode=oD_hash.trim(),url="https://pan.baidu.com/s/"+panMatch; |
| 734 | + ecode=simpleRule.test(ecode)?ecode.match(simpleRule)[1]:codeRule.test(ecode)?ecode.match(codeRule)[1]:""; |
| 735 | + if(ecode)url+="#"+ecode; |
| 736 | + window.open(url); |
| 737 | + }else if(/^\s*(https|ftp)?:\/\//.test(oD_hash)){ |
| 738 | + var url=oD_hash.replace(/[^a-z0-9:\/%\?&\._\-\+\*]/gi,""); |
| 739 | + window.open(url); |
| 740 | + }else{ |
| 741 | + oD_hash=oD_hash.replace(/(\[.*\])|[\W_]/g,""); |
| 742 | + if(!regObj.btih.test(oD_hash)){ |
| 743 | + alert("hash值格式错误"); |
| 744 | + }else{ |
| 745 | + oD_link.href="magnet:?xt=urn:btih:"+oD_hash; |
| 746 | + oD_link.textContent="磁链"; |
| 747 | + oD_link2.href="http://www.torrent.org.cn/Home/torrent/download.html?hash="+oD_hash; |
| 748 | + oD_link2.textContent="种子"; |
| 749 | + oD_link2.style.cssText="margin-left:20px"; |
| 750 | + oD_link3.href="https://btso.pw/magnet/detail/hash/"+oD_hash; |
| 751 | + oD_link3.textContent="详情"; |
| 752 | + oD_link3.style.cssText="margin-left:20px"; |
| 753 | + } |
735 | 754 | } |
736 | | - oD_link.href="magnet:?xt=urn:btih:"+oD_hash; |
737 | | - oD_link.textContent="磁链"; |
738 | | - oD_link2.href="http://www.torrent.org.cn/Home/torrent/download.html?hash="+oD_hash; |
739 | | - oD_link2.textContent="种子"; |
740 | | - oD_link2.style.cssText="margin-left:20px"; |
741 | | - oD_link3.href="https://btso.pw/magnet/detail/hash/"+oD_hash; |
742 | | - oD_link3.textContent="详情"; |
743 | | - oD_link3.style.cssText="margin-left:20px"; |
744 | 755 | }; |
745 | 756 | var oD_link=document.createElement("a"); |
746 | 757 | var oD_link2=document.createElement("a"); |
|
0 commit comments