Doveboy

Untitled

May 18th, 2018
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 97.79 KB | None | 0 0
  1. // ==UserScript==
  2. // @name 豆瓣资源下载大师·完整版
  3. // @description 在豆瓣电影/电视剧/纪录片/综艺/动画等页面显示对应的在线播放链接、字幕下载链接及PT/NZB/BT/磁力/百度盘/115网盘等资源下载链接,聚合186+主流资源网站/字幕网站/资源搜索引擎,是目前聚合资源网站最多的脚本,独家资源颜色标记功能:有对应资源的网站显示绿色,当前无法访问的网站显示白色,没有对应资源的网站则显示删除线;给豆瓣电影条目添加IMDB评分、Metascore及烂番茄评分;本脚本聚合的网站包含需要登陆才能自动颜色标记是否有对应资源的PT/NZB/论坛等网站,如无需聚合这些需要登陆的资源网站,请下载安装豆瓣资源下载大师·轻量版脚本。
  4. // @author 白鸽男孩
  5. // @connect *
  6. // @grant GM_xmlhttpRequest
  7. // @grant GM_setClipboard
  8. // @grant GM_addStyle
  9. // @grant GM_setValue
  10. // @grant GM_getValue
  11. // @grant GM_listValues
  12. // @grant GM_deleteValue
  13. // @grant GM_registerMenuCommand
  14. // @require http://cdn.bootcss.com/jquery/3.2.1/jquery.min.js
  15. // @require https://greasyfork.org/scripts/368137-encodetogb2312/code/encodeToGb2312.js?version=598005
  16. // @include https://movie.douban.com/subject/*
  17. // @include https://music.douban.com/subject/*
  18. // @include https://book.douban.com/subject/*
  19. // @version 4.6.4
  20. // @run-at document-start
  21. // @namespace doveboy_js
  22. // ==/UserScript==
  23.  
  24. // add back in GM_addStyle for scripts in @grant none mode
  25. if (typeof GM_addStyle === "undefined") {
  26. function GM_addStyle (cssStr) {
  27. let D = document;
  28. let newNode = D.createElement ('style');
  29. newNode.textContent = cssStr;
  30.  
  31. let targ = D.getElementsByTagName ('head')[0] || D.body || D.documentElement;
  32. targ.appendChild (newNode);
  33. }
  34. }
  35.  
  36. let myScriptStyle = "@charset utf-8;#dale_movie_subject_top_right,#dale_movie_subject_top_right,#dale_movie_subject_top_midle,#dale_movie_subject_middle_right,#dale_movie_subject_bottom_super_banner,#footer,#dale_movie_subject_download_middle,#dale_movie_subject_inner_middle,#movie_home_left_bottom,#dale_movie_home_top_right,#dale_movie_home_side_top,#dale_movie_home_bottom_right,#dale_movie_home_inner_bottom,#dale_movie_home_download_bottom,#dale_movie_home_bottom_right_down,#dale_movie_towhome_explore_right,#dale_movie_chart_top_right,#dale_movie_tags_top_right,#dale_review_best_top_right,.mobile-app-entrance.block5.app-movie,.qrcode-app,.top-nav-doubanapp,.extra,div.gray_ad,p.pl,div.ticket{display:none}.c-aside{margin-bottom:30px}.c-aside-body{*letter-spacing:normal}.c-aside-body a{border-radius:6px;color:#37A;display:inline-block;letter-spacing:normal;margin:0 8px 8px 0;padding:0 8px;text-align:center;width:65px}.c-aside-body a:link,.c-aside-body a:visited{background-color:#f5f5f5;color:#37A}.c-aside-body a:hover,.c-aside-body a:active{background-color:#e8e8e8;color:#37A}.c-aside-body a.disabled{}.c-aside-body a.available{background-color:#5ccccc;color:#006363}.c-aside-body a.available:hover,.c-aside-body a.available:active{background-color:#3cc}.c-aside-body a.sites_r0{text-decoration:line-through}#c_dialog li{margin:10px}#c_dialog{text-align:center}#interest_sectl .rating_imdb{border-top:1px solid #eaeaea;border-bottom:1px solid #eaeaea;padding-bottom:0}#interest_sectl .rating_wrap{padding-top:15px}#interest_sectl .rating_more{border-bottom:1px solid #eaeaea;color:#9b9b9b;margin:0;padding:15px 0;position:relative}#interest_sectl .rating_more a{left:80px;position:absolute}#interest_sectl .rating_more .titleOverviewSprite{background:url(https://coding.net/u/Changhw/p/MyDoubanMovieHelper/git/raw/master/title_overview_sprite.png) no-repeat;display:inline-block;vertical-align:middle}#interest_sectl .rating_more .popularityImageUp{background-position:-14px -478px;height:8px;width:8px}#interest_sectl .rating_more .popularityImageDown{background-position:-34px -478px;height:8px;width:8px}#interest_sectl .rating_more .popularityUpOrFlat{color:#83C40B}#interest_sectl .rating_more .popularityDown{color:#930E02}/*!jQuery UI - v1.12.1 - 2016-09-14 * http://jqueryui.com * Includes:core.css,accordion.css,autocomplete.css,menu.css,button.css,controlgroup.css,checkboxradio.css,datepicker.css,dialog.css,draggable.css,resizable.css,progressbar.css,selectable.css,selectmenu.css,slider.css,sortable.css,spinner.css,tabs.css,tooltip.css,theme.css * To view and modify this theme,visit http://jqueryui.com/themeroller/?bgShadowXPos=&bgOverlayXPos=&bgErrorXPos=&bgHighlightXPos=&bgContentXPos=&bgHeaderXPos=&bgActiveXPos=&bgHoverXPos=&bgDefaultXPos=&bgShadowYPos=&bgOverlayYPos=&bgErrorYPos=&bgHighlightYPos=&bgContentYPos=&bgHeaderYPos=&bgActiveYPos=&bgHoverYPos=&bgDefaultYPos=&bgShadowRepeat=&bgOverlayRepeat=&bgErrorRepeat=&bgHighlightRepeat=&bgContentRepeat=&bgHeaderRepeat=&bgActiveRepeat=&bgHoverRepeat=&bgDefaultRepeat=&iconsHover=url(%22images%2Fui-icons_555555_256x240.png%22)&iconsHighlight=url(%22images%2Fui-icons_777620_256x240.png%22)&iconsHeader=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsError=url(%22images%2Fui-icons_cc0000_256x240.png%22)&iconsDefault=url(%22images%2Fui-icons_777777_256x240.png%22)&iconsContent=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsActive=url(%22images%2Fui-icons_ffffff_256x240.png%22)&bgImgUrlShadow=&bgImgUrlOverlay=&bgImgUrlHover=&bgImgUrlHighlight=&bgImgUrlHeader=&bgImgUrlError=&bgImgUrlDefault=&bgImgUrlContent=&bgImgUrlActive=&opacityFilterShadow=Alpha(Opacity%3D30)&opacityFilterOverlay=Alpha(Opacity%3D30)&opacityShadowPerc=30&opacityOverlayPerc=30&iconColorHover=%23555555&iconColorHighlight=%23777620&iconColorHeader=%23444444&iconColorError=%23cc0000&iconColorDefault=%23777777&iconColorContent=%23444444&iconColorActive=%23ffffff&bgImgOpacityShadow=0&bgImgOpacityOverlay=0&bgImgOpacityError=95&bgImgOpacityHighlight=55&bgImgOpacityContent=75&bgImgOpacityHeader=75&bgImgOpacityActive=65&bgImgOpacityHover=75&bgImgOpacityDefault=75&bgTextureShadow=flat&bgTextureOverlay=flat&bgTextureError=flat&bgTextureHighlight=flat&bgTextureContent=flat&bgTextureHeader=flat&bgTextureActive=flat&bgTextureHover=flat&bgTextureDefault=flat&cornerRadius=3px&fwDefault=normal&ffDefault=Arial%2CHelvetica%2Csans-serif&fsDefault=1em&cornerRadiusShadow=8px&thicknessShadow=5px&offsetLeftShadow=0px&offsetTopShadow=0px&opacityShadow=.3&bgColorShadow=%23666666&opacityOverlay=.3&bgColorOverlay=%23aaaaaa&fcError=%235f3f3f&borderColorError=%23f1a899&bgColorError=%23fddfdf&fcHighlight=%23777620&borderColorHighlight=%23dad55e&bgColorHighlight=%23fffa90&fcContent=%23333333&borderColorContent=%23dddddd&bgColorContent=%23ffffff&fcHeader=%23333333&borderColorHeader=%23dddddd&bgColorHeader=%23e9e9e9&fcActive=%23ffffff&borderColorActive=%23003eff&bgColorActive=%23007fff&fcHover=%232b2b2b&borderColorHover=%23cccccc&bgColorHover=%23ededed&fcDefault=%23454545&borderColorDefault=%23c5c5c5&bgColorDefault=%23f6f6f6 * Copyright jQuery Foundation and other contributors;Licensed MIT */ .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{border:0;font-size:100%;line-height:1.3;list-style:none;margin:0;outline:0;padding:0;text-decoration:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{border-collapse:collapse;content:'';display:table}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{height:100%;left:0;opacity:0;position:absolute;top:0;width:100%;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default !important;pointer-events:none}.ui-icon{background-repeat:no-repeat;display:inline-block;margin-top:-.25em;overflow:hidden;position:relative;text-indent:-99999px;vertical-align:middle}.ui-widget-icon-block{display:block;left:50%;margin-left:-8px}.ui-widget-overlay{height:100%;left:0;position:fixed;top:0;width:100%}.ui-accordion .ui-accordion-header{cursor:pointer;display:block;font-size:100%;margin:2px 0 0 0;padding:.5em .5em .5em .7em;position:relative}.ui-accordion .ui-accordion-content{border-top:0;overflow:auto;padding:1em 2.2em}.ui-autocomplete{cursor:default;left:0;position:absolute;top:0}.ui-menu{display:block;list-style:none;margin:0;outline:0;padding:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{cursor:pointer;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);margin:0}.ui-menu .ui-menu-item-wrapper{padding:3px 1em 3px .4em;position:relative}.ui-menu .ui-menu-divider{border-width:1px 0 0 0;font-size:0;height:0;line-height:0;margin:5px 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{bottom:0;left:.2em;margin:auto 0;position:absolute;top:0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-button{cursor:pointer;display:inline-block;line-height:normal;margin-right:.1em;overflow:visible;padding:.4em 1em;position:relative;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{box-sizing:border-box;text-indent:-9999px;white-space:nowrap;width:2em}input.ui-button.ui-button-icon-only{text-indent:0}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px;margin-top:-8px;position:absolute;top:50%}.ui-button.ui-icon-notext .ui-icon{height:2.1em;padding:0;text-indent:-9999px;white-space:nowrap;width:2.1em}input.ui-button.ui-icon-notext .ui-icon{height:auto;padding:.4em 1em;text-indent:0;white-space:normal;width:auto}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-controlgroup{display:inline-block;vertical-align:middle}.ui-controlgroup>.ui-controlgroup-item{float:left;margin-left:0;margin-right:0}.ui-controlgroup>.ui-controlgroup-item:focus,.ui-controlgroup>.ui-controlgroup-item.ui-visual-focus{z-index:9999}.ui-controlgroup-vertical>.ui-controlgroup-item{display:block;float:none;margin-bottom:0;margin-top:0;text-align:left;width:100%}.ui-controlgroup-vertical .ui-controlgroup-item{box-sizing:border-box}.ui-controlgroup .ui-controlgroup-label{padding:.4em 1em}.ui-controlgroup .ui-controlgroup-label span{font-size:80%}.ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item{border-left:none}.ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item{border-top:none}.ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content{border-right:none}.ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content{border-bottom:none}.ui-controlgroup-vertical .ui-spinner-input{width:75%;width:calc(100% - 2.4em)}.ui-controlgroup-vertical .ui-spinner .ui-spinner-up{border-top-style:solid}.ui-checkboxradio-label .ui-icon-background{border:0;border-radius:.12em;box-shadow:inset 1px 1px 1px #ccc}.ui-checkboxradio-radio-label .ui-icon-background{border:0;border-radius:1em;height:16px;overflow:visible;width:16px}.ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon,.ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon{background-image:none;border-style:solid;border-width:4px;height:8px;width:8px}.ui-checkboxradio-disabled{pointer-events:none}.ui-datepicker{display:none;padding:.2em .2em 0;width:17em}.ui-datepicker .ui-datepicker-header{padding:.2em 0;position:relative}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{height:1.8em;position:absolute;top:2px;width:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;left:50%;margin-left:-8px;margin-top:-8px;position:absolute;top:50%}.ui-datepicker .ui-datepicker-title{line-height:1.8em;margin:0 2.3em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{border-collapse:collapse;font-size:.9em;margin:0 0 .4em;width:100%}.ui-datepicker th{border:0;font-weight:bold;padding:.7em .3em;text-align:center}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;border-bottom:0;border-left:0;border-right:0;margin:.7em 0 0 0;padding:0 .2em}.ui-datepicker .ui-datepicker-buttonpane button{cursor:pointer;float:right;margin:.5em .2em .4em;overflow:visible;padding:.2em .6em .3em .6em;width:auto}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{margin:0 auto .4em;width:95%}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;font-size:0;width:100%}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{left:auto;right:2px}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{left:auto;right:1px}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:1px;border-right-width:0}.ui-datepicker .ui-icon{background-repeat:no-repeat;display:block;left:.5em;overflow:hidden;text-indent:-99999px;top:.3em}.ui-dialog{left:0;outline:0;padding:.2em;position:absolute;top:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;overflow:hidden;white-space:nowrap;width:90%;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{height:20px;margin:-10px 0 0 0;padding:1px;position:absolute;right:.3em;top:50%;width:20px}.ui-dialog .ui-dialog-content{background:none;border:0;overflow:auto;padding:.5em 1em;position:relative}.ui-dialog .ui-dialog-buttonpane{background-image:none;border-width:1px 0 0 0;margin-top:.5em;padding:.3em 1em .5em .4em;text-align:left}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{cursor:pointer;margin:.5em .4em .5em 0}.ui-dialog .ui-resizable-n{height:2px;top:0}.ui-dialog .ui-resizable-e{right:0;width:2px}.ui-dialog .ui-resizable-s{bottom:0;height:2px}.ui-dialog .ui-resizable-w{left:0;width:2px}.ui-dialog .ui-resizable-se,.ui-dialog .ui-resizable-sw,.ui-dialog .ui-resizable-ne,.ui-dialog .ui-resizable-nw{height:7px;width:7px}.ui-dialog .ui-resizable-se{bottom:0;right:0}.ui-dialog .ui-resizable-sw{bottom:0;left:0}.ui-dialog .ui-resizable-ne{right:0;top:0}.ui-dialog .ui-resizable-nw{left:0;top:0}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{display:block;font-size:.1px;position:absolute;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;left:0;top:-5px;width:100%}.ui-resizable-s{bottom:-5px;cursor:s-resize;height:7px;left:0;width:100%}.ui-resizable-e{cursor:e-resize;height:100%;right:-5px;top:0;width:7px}.ui-resizable-w{cursor:w-resize;height:100%;left:-5px;top:0;width:7px}.ui-resizable-se{bottom:1px;cursor:se-resize;height:12px;right:1px;width:12px}.ui-resizable-sw{bottom:-5px;cursor:sw-resize;height:9px;left:-5px;width:9px}.ui-resizable-nw{cursor:nw-resize;height:9px;left:-5px;top:-5px;width:9px}.ui-resizable-ne{cursor:ne-resize;height:9px;right:-5px;top:-5px;width:9px}.ui-progressbar{height:2em;overflow:hidden;text-align:left}.ui-progressbar .ui-progressbar-value{height:100%;margin:-1px}.ui-progressbar .ui-progressbar-overlay{background:url(data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==);height:100%;opacity:.25;filter:alpha(opacity=25)}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{border:1px dotted black;position:absolute;z-index:100}.ui-selectmenu-menu{display:none;left:0;margin:0;padding:0;position:absolute;top:0}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{border:0;font-size:1em;font-weight:bold;height:auto;line-height:1.5;margin:.5em 0 0 0;padding:2px .4em}.ui-selectmenu-open{display:block}.ui-selectmenu-text{display:block;margin-right:20px;overflow:hidden;text-overflow:ellipsis}.ui-selectmenu-button.ui-button{text-align:left;white-space:nowrap;width:14em}.ui-selectmenu-icon.ui-icon{float:right;margin-top:0}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{cursor:default;height:1.2em;position:absolute;width:1.2em;z-index:2;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{background-position:0 0;border:0;display:block;font-size:.7em;position:absolute;z-index:1}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{margin-left:-.6em;top:-.3em}.ui-slider-horizontal .ui-slider-range{height:100%;top:0}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{height:100px;width:.8em}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-bottom:-.6em;margin-left:0}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-spinner{display:inline-block;overflow:hidden;padding:0;position:relative;vertical-align:middle}.ui-spinner-input{background:none;border:0;color:inherit;margin:.2em 0;margin-left:.4em;margin-right:2em;padding:.222em 0;vertical-align:middle}.ui-spinner-button{cursor:default;display:block;font-size:.5em;height:50%;margin:0;overflow:hidden;padding:0;position:absolute;right:0;text-align:center;width:1.6em}.ui-spinner a.ui-spinner-button{border-bottom-style:none;border-right-style:none;border-top-style:none}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-tabs{padding:.2em;position:relative}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{border-bottom-width:0;float:left;list-style:none;margin:1px .2em 0 0;padding:0;position:relative;top:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{background:none;border-width:0;display:block;padding:1em 1.4em}.ui-tooltip{max-width:300px;padding:8px;position:absolute;z-index:9999}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget.ui-widget-content{border:1px solid #c5c5c5}.ui-widget-content{background:#fff;border:1px solid #ddd;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{background:#e9e9e9;border:1px solid #ddd;color:#333;font-weight:bold}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,.ui-button,html .ui-button.ui-state-disabled:hover,html .ui-button.ui-state-disabled:active{background:#f6f6f6;border:1px solid #c5c5c5;color:#454545;font-weight:normal}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button,.ui-button{color:#454545;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus,.ui-button:hover,.ui-button:focus{background:#ededed;border:1px solid #ccc;color:#2b2b2b;font-weight:normal}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,a.ui-button:hover,a.ui-button:focus{color:#2b2b2b;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px #5e9ed6}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active,.ui-button:active,.ui-button.ui-state-active:hover{background:#007fff;border:1px solid #003eff;color:#fff;font-weight:normal}.ui-icon-background,.ui-state-active .ui-icon-background{background-color:#fff;border:#003eff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{background:#fffa90;border:1px solid #dad55e;color:#777620}.ui-state-checked{background:#fffa90;border:1px solid #dad55e}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#777620}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{background:#fddfdf;border:1px solid #f1a899;color:#5f3f3f}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#5f3f3f}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#5f3f3f}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{font-weight:normal;opacity:.7;filter:Alpha(Opacity=70)}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{background-image:none;opacity:.35;filter:Alpha(Opacity=35)}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{height:16px;width:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(https://cdn.bootcss.com/jqueryui/1.12.1/images/ui-icons_444444_256x240.png)}.ui-widget-header .ui-icon{background-image:url(https://cdn.bootcss.com/jqueryui/1.12.1/images/ui-icons_444444_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon,.ui-button:hover .ui-icon,.ui-button:focus .ui-icon{background-image:url(https://cdn.bootcss.com/jqueryui/1.12.1/images/ui-icons_555555_256x240.png)}.ui-state-active .ui-icon,.ui-button:active .ui-icon{background-image:url(https://cdn.bootcss.com/jqueryui/1.12.1/images/ui-icons_ffffff_256x240.png)}.ui-state-highlight .ui-icon,.ui-button .ui-state-highlight.ui-icon{background-image:url(https://cdn.bootcss.com/jqueryui/1.12.1/images/ui-icons_777620_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(https://cdn.bootcss.com/jqueryui/1.12.1/images/ui-icons_cc0000_256x240.png)}.ui-button .ui-icon{background-image:url(https://cdn.bootcss.com/jqueryui/1.12.1/images/ui-icons_777777_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:3px}.ui-widget-overlay{background:#aaa;opacity:.003;filter:Alpha(Opacity=.3)}.ui-widget-shadow{-webkit-box-shadow:0 0 5px #666;box-shadow:0 0 5px #666}";
  37. GM_addStyle(myScriptStyle);
  38.  
  39. // 定义基础方法
  40. function getDoc(url, meta, callback) {
  41. GM_xmlhttpRequest({
  42. method: 'GET',
  43. url: url,
  44. headers: {
  45. 'User-agent': window.navigator.userAgent,
  46. 'Content-type': null
  47. },
  48. onload: function (responseDetail) {
  49. if (responseDetail.status === 200) {
  50. let doc = (new DOMParser).parseFromString(responseDetail.responseText, 'text/html');
  51. callback(doc, responseDetail, meta);
  52. }
  53. }
  54. });
  55. }
  56. function getJSON(url, callback) {
  57. GM_xmlhttpRequest({
  58. method: 'GET',
  59. url: url,
  60. headers: {
  61. 'Accept': 'application/json'
  62. },
  63. onload: function (response) {
  64. if (response.status >= 200 && response.status < 400) {
  65. callback(JSON.parse(response.responseText), url);
  66. } else {
  67. callback(false, url);
  68. }
  69. }
  70. });
  71. }
  72.  
  73. let cache_prefix = "cache_";
  74.  
  75. function GM_deletedCacheValue(name) {
  76. GM_deleteValue(name);
  77. GM_deleteValue(cache_prefix + name);
  78. }
  79.  
  80. function GM_setCacheValue (name,value,expire,json_parser) {
  81. GM_setValue(name,json_parser ? JSON.stringify(value) : value);
  82. GM_setValue(cache_prefix + name,json_parser ? JSON.stringify(Date.now() + expire) : (Date.now() + expire));
  83. }
  84.  
  85. function GM_getCacheValue (name,defaultValue,json_parser) {
  86. let expire_timestamp = parseInt(GM_getValue(cache_prefix + name));
  87. if (expire_timestamp < Date.now()) {
  88. GM_deletedCacheValue(name);
  89. }
  90.  
  91. return json_parser ? JSON.parse(GM_getValue(name,defaultValue)): GM_getValue(name,defaultValue);
  92. }
  93.  
  94. function GM_clearExpiredCacheValue(force) {
  95. let cache_key = GM_listValues().filter(function (key) {
  96. return key.includes(cache_prefix)
  97. });
  98. for (let i=0;i< cache_key.length;i++) {
  99. let name = cache_key[i].slice(cache_prefix.length);
  100. let expired_timestamp = GM_getValue(cache_prefix + name);
  101. if(force || expired_timestamp < Date.now()) {
  102. GM_deletedCacheValue(name);
  103. }
  104. }
  105. }
  106.  
  107. GM_clearExpiredCacheValue(false);
  108.  
  109. let _version = GM_getValue("version","完整版");
  110. let delete_site_prefix = "delete_site_";
  111.  
  112. if (typeof GM_registerMenuCommand !== "undefined") {
  113.  
  114. function changeVersionConfirm() {
  115. if (confirm(`你当前版本是 ${_version},是否进行切换?`)) {
  116. GM_setValue("version",_version === "完整版" ? "轻量版" : "完整版");
  117. }
  118. }
  119. GM_registerMenuCommand("脚本功能切换",changeVersionConfirm);
  120.  
  121. function deleteSitePrompt() {
  122. let name=prompt("请输入你不想看到的分类/站点名称,多站点请以英文逗号分割。请注意,除非重装脚本,否则该操作不可撤销","");
  123. if (name!=null && name!=="") {
  124. let delete_list = name.split(",");
  125. for (let i=0;i<delete_list.length;i++) {
  126. let name = delete_list[i];
  127. if (GM_getValue(delete_site_prefix + name,false)) { // 二次输入恢复
  128. GM_deleteValue(delete_site_prefix + name);
  129. } else {
  130. GM_setValue(delete_site_prefix + name,true);
  131. }
  132. }
  133. }
  134. }
  135. GM_registerMenuCommand("删除不想显示的站",deleteSitePrompt);
  136.  
  137. function changeTagBColor() {
  138. let now_bcolor_list = [GM_getValue("tag_bcolor_exist","#e3f1ed"),GM_getValue("tag_bcolor_not_exist","#f4eac2"),GM_getValue("tag_bcolor_need_login",""),GM_getValue("tag_bcolor_error","")];
  139. let name = prompt("请依次输入代表'资源存在','资源不存在','站点需要登陆','站点解析错误'颜色的Hex值,并用英文逗号分割。当前值为:" , `${now_bcolor_list.join(',')}`);
  140. if (name!=null && name!=="") {
  141. try {
  142. let bcolor_list = name.split(",");
  143. GM_setValue("tag_bcolor_exist",bcolor_list[0] || "#e3f1ed");
  144. GM_setValue("tag_bcolor_not_exist",bcolor_list[1] || "#f4eac2");
  145. GM_setValue("tag_bcolor_need_login",bcolor_list[2] || "");
  146. GM_setValue("tag_bcolor_error",bcolor_list[3] || "");
  147. } catch (e) {
  148. alert("解析输入出错");
  149. }
  150. }
  151. }
  152. GM_registerMenuCommand("更改标签背景色",changeTagBColor);
  153.  
  154. function changeTagFColor() {
  155. let now_fcolor_list = [GM_getValue("tag_fcolor_exist","#3377aa"),GM_getValue("tag_fcolor_not_exist","#3377aa"),GM_getValue("tag_fcolor_need_login","#3377aa"),GM_getValue("tag_fcolor_error","#3377aa")];
  156. let name = prompt("请依次输入代表'资源存在','资源不存在','站点需要登陆','站点解析错误'颜色的Hex值,并用英文逗号分割。当前值为:" , `${now_fcolor_list.join(',')}`);
  157. if (name!=null && name!=="") {
  158. try {
  159. let fcolor_list = name.split(",");
  160. GM_setValue("tag_fcolor_exist",fcolor_list[0] || "#3377aa");
  161. GM_setValue("tag_fcolor_not_exist",fcolor_list[1] || "#3377aa");
  162. GM_setValue("tag_fcolor_need_login",fcolor_list[2] || "#3377aa");
  163. GM_setValue("tag_fcolor_error",fcolor_list[3] || "#3377aa");
  164. } catch (e) {
  165. alert("解析输入出错");
  166. }
  167. }
  168. }
  169. GM_registerMenuCommand("更改标签文字色",changeTagFColor);
  170.  
  171. function forceCacheClear() {
  172. if (confirm("清空所有缓存信息(包括资源存在情况、登陆情况、imdb250等)")) {
  173. GM_clearExpiredCacheValue(true);
  174. }
  175. }
  176. GM_registerMenuCommand("清空脚本缓存",forceCacheClear);
  177.  
  178. }
  179.  
  180.  
  181. $(document).ready(function () {
  182.  
  183. let site_map = [];
  184.  
  185. /** label对象键值说明:
  186. * name: String 站点名称,请注意该站点名称在不同的site_map中也应该唯一,以免脚本后续判断出错
  187. * method: String 搜索请求方式,默认值为 "GET"
  188. * link: String 构造好的请求页面链接,作为label的href属性填入,用户应该能直接点开这个页面。
  189. * ajax: String 如果站点使用ajax的形式加载页面,则需要传入该值作为实际请求的链接,即优先级比link更高。
  190. * type: String 返回结果类型,脚本默认按html页面解析;只有当传入值为"json"时,脚本按JSON格式解析
  191. * selector: String 搜索成功判断结果,默认值为 "table.torrents:last > tbody > tr:gt(0)" (适用于国内多数NexusPHP构架的站点)
  192. * 如果type为"page"(默认)时,为一个(jQuery)CSS选择器,
  193. * 如果type为"json"时,为一个具体的判断式。
  194. * selector_need_login 搜索需要登录的选择器,仅在type为默认时有用,其余用法同Selector一致。
  195. * data: String 作为请求的主体发送的内容,默认为空即可
  196. * headers: Object 修改默认请求头,(防止某些站点有referrer等请求头检查
  197. * rewrite_href: Boolean 如果站点最终搜索显示的页面与实际使用搜索页面(特别是使用post进行交互的站点)不一致,
  198. * 设置为true能让脚本存储最终url,并改写label使用的href属性
  199. *
  200. * 注意: 1. 如果某键有默认值,则传入值均会覆盖默认值
  201. * 2. 关于请求方法请参考:https://github.com/scriptish/scriptish/wiki/GM_xmlhttpRequest
  202. * */
  203.  
  204. if (location.host === "movie.douban.com") {
  205. // 脚本对页面进行预处理
  206. if($('#info span.pl:contains("又名")').length === 0){
  207. $('#info').append('<div style="display: none"><span class="pl">又名:</span>啥也没有<br></div>');
  208. }
  209.  
  210. if($('div#info a[href^=\'http://www.imdb.com/title/tt\']').length === 0){
  211. $('#info').append('<div style="display: none"><span class="pl">IMDb链接:</span><a href="http://www.imdb.com/title/tt9999999" target="_blank" rel="nofollow">tt9999999</a><br></div>');
  212. }
  213.  
  214. if ($('#mainpic p.gact').length === 0) {
  215. $("#mainpic").append("<p class=\"gact\"></p>")
  216. }
  217.  
  218. let interest_sectl_selector = $('#interest_sectl');
  219. interest_sectl_selector.after($('div.grid-16-8 div.related-info'));
  220. interest_sectl_selector.attr('style', 'float:right');
  221. $('div.related-info').attr('style', 'width:480px;float:left');
  222.  
  223. $("div#info").append("<span class=\"pl\">生成信息: </span><a id='movieinfogen' href='javascript:void(0);'>movieinfo</a>");
  224. let movieinfo_html = $("<div class='c-aside' style='float:left;margin-top:20px;width: 470px;display: none' id='movieinfo_div'><h2><i>电影简介</i>· · · · · · </h2><a href='javascript:void(0);' id='copy_movieinfo'>点击复制</a><div class=\"c-aside-body\" style=\"padding: 0 12px;\" id='movieinfo'></div></div>");
  225. if ($("#movieinfo").length === 0) {
  226. $("div.related-info").before(movieinfo_html);
  227. $("a#copy_movieinfo").click(function() {
  228. let movieinfo_html = $("#movieinfo").html();
  229. let movieclip = movieinfo_html.replace(/<br>/ig,"\n")
  230. .replace(/<a [^>]*>/g,"").replace(/<\/a>/g,"");
  231. GM_setClipboard(movieclip);
  232. $(this).text("复制成功");
  233. })
  234. }
  235.  
  236. // 查看原图
  237. let posterAnchor = document.querySelector('#mainpic > a > img');
  238. if (posterAnchor) {
  239. let postersUrl = posterAnchor.getAttribute("src");
  240. let rawUrl = postersUrl.replace(/photo\/s_ratio_poster\/public\/(p\d+).+$/,"photo/raw/public/$1.jpg");
  241. $('#mainpic p.gact').after(`<a target="_blank" rel="nofollow" href="${rawUrl}">查看原图</a>`);
  242. }
  243.  
  244. // Movieinfo信息生成相关
  245. let poster;
  246. let this_title, trans_title, aka;
  247. let year, region, genre,language,playdate;
  248. let imdb_link, imdb_id, imdb_average_rating, imdb_votes, imdb_rating;
  249. let douban_link, douban_id, douban_average_rating, douban_votes, douban_rating;
  250. let episodes, duration;
  251. let director, writer, cast;
  252. let tags,introduction,awards;
  253.  
  254. function descriptionGenerator() {
  255. let descr = "";
  256. descr += poster ? `[img]${poster}[/img]\n\n` : "";
  257. descr += (trans_title && !trans_title.match(/啥也没有/)) ? `◎译  名 ${trans_title}\n` : "";
  258. descr += this_title ? `◎片  名 ${this_title}\n` : "";
  259. descr += year ? `◎年  代 ${year.trim()}\n` : "";
  260. descr += region ? `◎产  地 ${region}\n` : "";
  261. descr += genre ? `◎类  别 ${genre}\n` : "";
  262. descr += language ? `◎语  言 ${language}\n` : "";
  263. descr += playdate ? `◎上映日期 ${playdate}\n` : "";
  264. descr += imdb_rating ? `◎IMDb评分 ${imdb_rating}\n` : ""; // 注意如果长时间没能请求完成imdb信息,则该条不显示
  265. descr += (imdb_link && !imdb_link.match(/9999999/)) ? `◎IMDb链接 ${imdb_link}\n` : "";
  266. descr += douban_rating ? `◎豆瓣评分 ${douban_rating}\n` : "";
  267. descr += douban_link ? `◎豆瓣链接 ${douban_link}\n` : "";
  268. descr += episodes ? `◎集  数 ${episodes}\n` : "";
  269. descr += duration ? `◎片  长 ${duration}\n` : "";
  270. descr += director ? `◎导  演 ${director}\n` : "";
  271. descr += writer ? `◎编  剧 ${writer}\n` : "";
  272. descr += cast ? `◎主  演 ${cast.replace(/\n/g, '\n' + ' '.repeat(4) + '  ').trim()}\n` : "";
  273. descr += tags ? `\n◎标  签 ${tags}\n` : "";
  274. descr += introduction ? `\n◎简  介\n\n  ${introduction.replace(/\n/g, '\n' + ' '.repeat(2))}\n` : "";
  275. descr += awards ? `\n◎获奖情况\n\n  ${awards.replace(/\n/g, '\n' + ' '.repeat(2))}\n` : "";
  276. movieinfo_html.find("div#movieinfo").html(descr.replace(/\n/ig,"<br>"));
  277. }
  278. $("a#movieinfogen").click(function() {
  279. descriptionGenerator();
  280. $("#movieinfo_div").toggle();
  281. });
  282.  
  283. let fetch = function (anchor) {
  284. return anchor[0].nextSibling.nodeValue.trim();
  285. };
  286.  
  287. // 从页面中解析信息并请求imdb等第三方数据
  288. let chinese_title = document.title.replace('(豆瓣)','').trim();
  289. let foreign_title = $('#content h1>span[property="v:itemreviewed"]').text().replace(chinese_title, '').trim();
  290. let aka_anchor = $('#info span.pl:contains("又名")');
  291. if (aka_anchor[0]) {
  292. aka = fetch(aka_anchor).split(' / ').sort(function (a, b) {//首字(母)排序
  293. return a.localeCompare(b);
  294. }).join('/');
  295. }
  296. if (foreign_title) {
  297. trans_title = chinese_title + (aka ? ('/' + aka) : '');
  298. this_title = foreign_title;
  299. } else {
  300. trans_title = aka ? aka : '';
  301. this_title = chinese_title;
  302. }
  303. year = ' ' + $('#content > h1 > span.year').text().substr(1, 4);
  304.  
  305. let regions_anchor = $('#info span.pl:contains("制片国家/地区")'); //产地
  306. if (regions_anchor[0]) {
  307. region = fetch(regions_anchor).split(' / ').join('/');
  308. }
  309.  
  310. genre = $('#info span[property="v:genre"]').map(function () { //类别
  311. return $(this).text().trim();
  312. }).toArray().join('/');
  313.  
  314. let language_anchor = $('#info span.pl:contains("语言")'); //语言
  315. if (language_anchor[0]) {
  316. language = fetch(language_anchor).split(' / ').join('/');
  317. }
  318.  
  319. playdate = $('#info span[property="v:initialReleaseDate"]').map(function () { //上映日期
  320. return $(this).text().trim();
  321. }).toArray().sort(function (a, b) {//按上映日期升序排列
  322. return new Date(a) - new Date(b);
  323. }).join('/');
  324. //IMDb链接
  325. let imdb_link_anchor = $('#info span.pl:contains("IMDb链接")');
  326. if (imdb_link_anchor[0]) { // 请求IMDb信息(最慢,最先且单独请求)
  327. imdb_link = imdb_link_anchor.next().attr('href').replace(/(\/)?$/, '/').replace("http://","https://");
  328. imdb_id = imdb_link.match(/tt\d+/)[0];
  329.  
  330. // add IMDB top 250 tag
  331. function addIMDBtop250(list) {
  332. let number = list.indexOf('data-tconst="' + imdb_id + '"') + 1;
  333. if (number < 1 || number > 250) return;
  334. // inject css if needed
  335. if (document.getElementsByClassName('top250').length === 0) {
  336. let style = '.top250{background:url(https://s.doubanio.com/f/movie/f8a7b5e23d00edee6b42c6424989ce6683aa2fff/pics/movie/top250_bg.png) no-repeat;width:150px;font:12px Helvetica,Arial,sans-serif;margin:5px 0;color:#744900}.top250 span{display:inline-block;text-align:center;height:18px;line-height:18px}.top250 a,.top250 a:link,.top250 a:hover,.top250 a:active,.top250 a:visited{color:#744900;text-decoration:none;background:none}.top250-no{width:34%}.top250-link{width:66%}';
  337. GM_addStyle(style);
  338. }
  339. let after = document.getElementById('dale_movie_subject_top_icon');
  340. if (!after) after = document.querySelector('h1');
  341. after.insertAdjacentHTML('beforebegin', '<div class="top250"><span class="top250-no">No.' + number + '</span><span class="top250-link"><a href="http://www.imdb.com/chart/top">IMDb Top 250</a></span></div>');
  342. [].forEach.call(document.getElementsByClassName('top250'), function (e) {
  343. e.style.display = 'inline-block';
  344. });
  345. }
  346.  
  347. let cache_imdb_250 = GM_getCacheValue("imdb_250",false);
  348. if (cache_imdb_250) {
  349. addIMDBtop250(cache_imdb_250);
  350. } else {
  351. getDoc('https://m.imdb.com/chart/top',null, function (doc,res) {
  352. let list = res.responseText.match(/data-tconst="(tt\d{7})"/g);
  353. GM_setCacheValue("imdb_250",list,86400 * 1e3);
  354. addIMDBtop250(list)
  355. });
  356. }
  357.  
  358. $("div.rating_betterthan").after("<div class='rating_wrap clearbox' id='loading_more_rate'>加载第三方评价信息中.......</div>");
  359. getDoc(imdb_link,null,function (doc) {
  360. // 评分,Metascore,烂番茄
  361. imdb_average_rating = $('span[itemprop=ratingValue]', doc).text();
  362. imdb_votes = $('span[itemprop=ratingCount]', doc).text();
  363. imdb_rating = imdb_votes ? imdb_average_rating + '/10 from ' + imdb_votes + ' users' : ''; // MovieinfoGen 相关
  364.  
  365. let starValue = parseFloat(imdb_average_rating) / 2;
  366. starValue = starValue % 1 > 0.5 ? Math.floor(starValue) + 0.5 : Math.floor(starValue);
  367. starValue *= 10;
  368.  
  369. $('#interest_sectl').append(`<div class="rating_wrap clearbox rating_imdb" rel="v:rating"> <div class=rating_logo >IMDB 评分</div> <div class="rating_self clearfix" typeof="v:Rating"> <strong class="ll rating_num" property="v:average">${imdb_average_rating}</strong><span property="v:best" content=10.0 ></span> <div class="rating_right "> <div class="ll bigstar ${'bigstar' + starValue}"></div> <div class="rating_sum"> <a href=${imdb_link + 'ratings?ref_=tt_ov_rt'} class=rating_people ><span property="v:votes">${imdb_votes}</span>人评价</a> </div> </div> </div> </div>`);
  370.  
  371. // put on more ratings
  372. $('#interest_sectl .rating_imdb').after('<div class="rating_more"></div>');
  373. let rating_more = $('#interest_sectl .rating_more');
  374. let titleReviewBarItem = $('.titleReviewBar div.titleReviewBarItem', doc);
  375. for (let i = 0; i < titleReviewBarItem.length; i++) {
  376. let item = titleReviewBarItem[i];
  377. let text = $(item).text();
  378. if (text.indexOf('Metascore') !== -1) {
  379. let metascore = $(item).find('a[href^=criticreviews] span').text();
  380. rating_more.append(`<div>Metascore<a href='${imdb_link + 'criticreviews?ref_=tt_ov_rt'}' target="_blank">${metascore}</a></div>`);
  381. } else if (text.indexOf('Popularity') !== -1) {
  382. let popularity = $(item).find('span.subText').html();
  383. popularity = `<div>流行度&nbsp;&nbsp;${popularity}<br><div>`;
  384. rating_more.append(popularity);
  385. } else if (text.indexOf('Reviews') !== -1) {
  386. // TODO let reviews;
  387. }
  388. }
  389.  
  390. // add rottentomatoes block
  391. $('#titleYear', doc).remove();
  392. let movieTitle = $.trim($('h1[itemprop=name]', doc).text());
  393. let rottURL = 'https://www.rottentomatoes.com/m/' + movieTitle.replace(/\s+/g,"_").replace(/\W+/g,"").toLowerCase();
  394. getDoc(rottURL, null, function(rotdoc) {
  395. let rott_html = '<div class="rating_wrap clearbox rating_rott"><span class="rating_logo ll">烂番茄新鲜度</span><br><div id="rottValue" class="rating_self clearfix"></div></div>';
  396. $('#interest_sectl').append(rott_html);
  397. if(!rotdoc.title){
  398. $('#interest_sectl div.rating_rott').append(`<br>搜索rotta: <a target='_blank' href='${'https://www.rottentomatoes.com/search/?search=' + encodeURI(movieTitle)}'>${movieTitle}</a>`);
  399. } else if($('#tomato_meter_link',rotdoc).length > 0) {
  400. let rating_rott_value = $('#tomato_meter_link .meter-value.superPageFontColor', rotdoc).html();
  401. $('#scoreStats .subtle.superPageFontColor', rotdoc).remove();
  402. let fresh_rott_value = $('#scoreStats .superPageFontColor:eq(2)', rotdoc).text();
  403. let rotten_rott_value = $('#scoreStats .superPageFontColor:eq(3)', rotdoc).text();
  404. $('#interest_sectl .rating_rott #rottValue').append(`<strong class="ll rating_num"><a target="_blank" href="${rottURL}">${rating_rott_value}</a></strong><div class="rating_right" style="line-height: 16px;"><span>鲜:&nbsp;&nbsp;${fresh_rott_value}</span><br><span>烂:&nbsp;&nbsp;${rotten_rott_value}</span></div>`);
  405. } else {
  406. $('#interest_sectl div.rating_rott').hide();
  407. }
  408. });
  409.  
  410. $("#loading_more_rate").hide();
  411. });
  412. }
  413.  
  414. douban_link = 'https://' + location.href.match(/movie.douban.com\/subject\/\d+\//); //豆瓣链接
  415. douban_id = location.href.match(/(\d{7,8})/g);
  416. //集数
  417. let episodes_anchor = $('#info span.pl:contains("集数")');
  418. if (episodes_anchor[0]) {
  419. episodes = fetch(episodes_anchor);
  420. }
  421. //片长
  422. let duration_anchor = $('#info span.pl:contains("单集片长")');
  423. if (duration_anchor[0]) {
  424. duration = fetch(duration_anchor);
  425. } else {
  426. duration = $('#info span[property="v:runtime"]').text().trim();
  427. }
  428.  
  429. getDoc(douban_link + 'awards/',null,function (doc) {
  430. awards = $('#content>div>div.article',doc).html()
  431. .replace(/[ \n]/g, '')
  432. .replace(/<\/li><li>/g, '</li> <li>')
  433. .replace(/<\/a><span/g, '</a> <span')
  434. .replace(/<(div|ul)[^>]*>/g, '\n')
  435. .replace(/<[^>]+>/g, '')
  436. .replace(/&nbsp;/g, ' ')
  437. .replace(/ +\n/g, '\n')
  438. .trim();
  439. }); // 该影片的评奖信息
  440. getJSON('https://api.douban.com/v2/movie/' + douban_id,function (data1) {
  441. douban_average_rating = data1.rating.average || 0;
  442. douban_votes = data1.rating.numRaters.toLocaleString() || 0;
  443. douban_rating = douban_average_rating + '/10 from ' + douban_votes + ' users';
  444. introduction = data1.summary.replace(/^None$/g, '暂无相关剧情介绍');
  445. poster = data1.image.replace(/s(_ratio_poster|pic)/g, 'l');
  446. director = data1.attrs.director ? data1.attrs.director.join(' / ') : '';
  447. writer = data1.attrs.writer ? data1.attrs.writer.join(' / ') : '';
  448. cast = data1.attrs.cast ? data1.attrs.cast.join('\n') : '';
  449. tags = data1.tags.map(function (member) {
  450. return member.name;
  451. }).join(' | ');
  452. }); //豆瓣评分,简介,海报,导演,编剧,演员,标签
  453.  
  454. // 获取电影英文名
  455. let eng_title = [this_title, trans_title].join("/").split("/").filter(function (arr) {
  456. return /([a-zA-Z]){2,}/.test(arr);
  457. })[0] || "";
  458.  
  459. // 剧集修正季数名
  460. eng_title = eng_title.match(/Season\s\d\d/) ? eng_title.replace(/Season\s/, "S") : eng_title.replace(/Season\s/, "S0");
  461. eng_title = eng_title.replace(/[:,!\-]/g, "").replace(/ [^a-z0-9]+$/,"");
  462. let eng_title_clean = eng_title.replace(/ S\d\d*$/, "");
  463.  
  464. // 电影+年份 (只有电影才搜索并赋值年份)
  465. let is_movie = $('a.bn-sharing').attr('data-type').match(/电影/);
  466. let encode_year = is_movie ? year.replace(/ /,"_") : "";
  467. let nian = is_movie ? year : "";
  468. let encode_eng_title = (eng_title || "").replace(/ /g,"_");
  469. let ptzimu = encode_eng_title + encode_year;
  470. chinese_title = chinese_title.replace(/[:,]/," ");
  471. let gtitle = encodeToGb2312(chinese_title,true);
  472. let ywm = eng_title + nian;
  473. let zwm = chinese_title + nian;
  474.  
  475. // get Chinese title
  476. let title = encodeURI($('#content > h1 > span')[0].textContent.split(' ').shift().replace(/[:,]/," "));
  477.  
  478.  
  479.  
  480. if (_version === "完整版") {
  481. let neizhan = imdb_id.match(/9999999/) ? ('/subject/' + douban_id) : imdb_id; // PT内站 智能判定是用IMDB ID还是豆瓣ID
  482. let npid = imdb_id.match(/9999999/) ? ('douban=' + douban_id) : ('imdb=' + imdb_id); // NPUBITS 智能判定是用IMDB ID还是豆瓣ID
  483. let ttgid = imdb_id.match(/9999999/) ? (zwm) : ( 'IMDB' + imdb_id.slice(2)); // TTG 智能判定是用IMDB ID还是中文名
  484. let zxid = imdb_id.match(/9999999/) ? (zwm) : imdb_id; // ZX 智能判定是用IMDB ID还是中文名
  485.  
  486. site_map.push({
  487. name: "PT内站",
  488. label: [
  489. {name: "BTSchool", link: 'http://pt.btschool.net/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan,/* selector: "table.torrents:last > tbody > tr:gt(0)"}, */},
  490. {name: "BYRBT", link: 'https://bt.byr.cn/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan,},
  491. {name: "CCFBits", link: 'http://www.ccfbits.org/browse.php?fullsearch=1&notnewword=1&search=' + neizhan, selector: "table.mainouter > tbody > tr:last > td > table:nth-child(10) > tbody > tr:gt(0)"},
  492. {name: "CHDBits", link: 'https://chdbits.co/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan,},
  493. {name: "CMCT", link: 'https://hdcmct.org/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan,},
  494. {name: "GZTown", link: 'https://pt.gztown.net/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan,},
  495. {name: "FRDS", link: 'http://pt.keepfrds.com/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan,},
  496. {name: "HDChina", link: 'https://hdchina.org/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan, selector: "table.torrent_list:last > tbody > tr:gt(0)"},
  497. {name: "HDCity", link: 'https://hdcity.city/pt?incldead=1&search_area=1&notnewword=1&iwannaseethis=' + neizhan, selector: "center > div > div > div.text"},
  498. {name: "HDHome", link: 'https://hdhome.org/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan,},
  499. {name: "HDSky", link: 'https://hdsky.me/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan,},
  500. {name: "HDStreet", link: 'https://hdstreet.club/torrents.php?incldead=1&search_area=4&notnewword=1&search=' + douban_id,},
  501. {name: "HDTime", link: 'https://hdtime.org/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan,},
  502. {name: "HDU", link: 'http://pt.upxin.net/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan,},
  503. {name: "Hyperay", link: 'https://hyperay.org/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan, selector: "table.torrents > tbody > tr.nonstick_outer_bg"},
  504. {name: "JoyHD", link: 'https://www.joyhd.net/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan,},
  505. {name: "MTeam", link: 'https://tp.m-team.cc/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan,},
  506. {name: "NPUBITS", link: 'https://npupt.com/torrents.php?incldead=1&search_area=1&notnewword=1&' + npid, selector: "#torrents_table > tbody > tr:gt(0)"},
  507. {name: "NWSUAF", link: 'https://pt.nwsuaf6.edu.cn/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan,},
  508. {name: "NYPT", link: 'https://nanyangpt.com/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan, selector: "table.torrents:last > tbody > tr"},
  509. {name: "OpenCD", link: 'https://open.cd/torrents.php?incldead=1&search_area=0&notnewword=1&search=' + chinese_title, selector: "table.torrents:last > tbody > tr:gt(0)"},
  510. {name: "OurBits", link: 'https://ourbits.club/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan,},
  511. {name: "OurDiSC", link: 'http://bt.ourdisc.net/browse.php?incldead=0&search=' + chinese_title, selector: "table[width='100%'][border='0'][cellspacing='0'][cellpadding='10'] i"},
  512. {name: "PlayPT", link: 'http://pt.playpt123.org/play.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan,},
  513. {name: "SJTU", link: 'https://pt.sjtu.edu.cn/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan, selector: "table.torrents:last > tbody > tr"},
  514. {name: "SS", link: 'https://skyeysnow.com/forum.php?mod=torrents&notnewword=1&search=' + chinese_title + year, selector: "table.torrents > tbody > tr:gt(0)"},
  515. {name: "TCCF", link: 'https://et8.org/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan,},
  516. {name: "TLFBits", link: 'http://pt.eastgame.org/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan,},
  517. {name: "TTG", link: 'https://totheglory.im/browse.php?c=M&notnewword=1&search_field=' + ttgid, selector: "table#torrent_table:last > tbody > tr:gt(0)"},
  518. {name: "U2", link: 'https://u2.dmhy.org/torrents.php?incldead=1&search_area=0&notnewword=1&search=' + chinese_title + year,},
  519. {name: "WHUPT", link: 'https://pt.whu.edu.cn/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + neizhan, selector: "table.torrents:last > tbody > tr"},
  520. {name: "ZX", link: 'http://pt.zhixing.bjtu.edu.cn/search/x' + zxid + '-notnewword=1/', selector: "table.torrenttable > tbody > tr:gt(1)"},
  521. ]
  522. });
  523. if(!imdb_id.match(/9999999/)){
  524. site_map.push({
  525. name: "PT外站",
  526. label:[
  527. {name: "AB", link: 'https://animebytes.tv/torrents.php?searchstr=' + ywm, selector: "div.thin > div.group_cont"},
  528. {name: "ADC", link: 'http://asiandvdclub.org/browse.php?descr=1&btnSubmit=Search%21&search=' + imdb_id, selector: "table.torrenttable:last > tbody > tr"},
  529. {name: "AOX", link: 'https://aox.to/index.php?page=torrents&options=4&search=' + imdb_id, selector: "table.table.table-bordered:last > tbody > tr:gt(0)"},
  530. {name: "Apollo", link: 'https://apollo.rip/torrents.php?searchstr=' + eng_title, selector:"#torrent_table:last > tbody > tr.group_torrent:gt(0)"},
  531. {name: "AR", link: 'https://alpharatio.cc/torrents.php?searchstr=' + ywm, selector:"#torrent_table > tbody > tr:gt(0)"},
  532. {name: "AT", link: 'https://animetorrents.me/torrents.php?search=' + eng_title, ajax: 'https://animetorrents.me/ajax/torrents_data.php?total=1&search=' + eng_title + '&SearchSubmit=&page=1' , headers:{"x-requested-with": "XMLHttpRequest"}, rewrite_href:false, selector:'table.dataTable > tbody > tr:nth-child(2)', selector_need_login:"h1.headline strong:contains('Access Denied!')"},
  533. {name: "AVZ", link: 'https://avistaz.to/torrents?in=1&search=' + ywm, selector:"table.table-condensed.table-striped.table-bordered:last > tbody > tr:gt(0)"},
  534. {name: "BakaBT", link: 'https://bakabt.me/browse.php?q=' + ywm, selector:"table.torrents > tbody > tr:gt(0)", selector_need_login:"#loginForm"},
  535. {name: "BHD", link: 'https://beyond-hd.me/browse.php?incldead=0&search=' + imdb_id, selector:"table.tb_detail.grey.torrenttable:last > tbody > tr:gt(0)"},
  536. {name: "CC", link: 'http://www.cartoonchaos.org/index.php?page=torrents&options=0&active=1&search=' + ywm, selector:"table > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(2) > td > table > tbody > tr:gt(0)"},
  537. {name: "HDF", link: 'https://hdf.world/torrents.php?searchstr=' + ywm, selector:"#torrent_table > tbody > tr:gt(0)"},
  538. {name: "HDME", link: 'http://hdme.eu/browse.php?incldead=1&blah=1&search=' + imdb_id, selector:"table:nth-child(13) > tbody > tr"},
  539. {name: "HDMonkey", link: 'https://hdmonkey.org/torrents-search.php?incldead=0&search=' + ywm, selector: "table.ttable_headinner > tbody > tr:gt(0)"},
  540. {name: "HDS", link: 'https://hd-space.org/index.php?page=torrents&active=1&options=2&search=' + imdb_id, selector: "table.lista:last > tbody > tr:gt(0)"},
  541. {name: "HDT", link: 'https://hd-torrents.org/torrents.php?active=1&options=2&search=' + imdb_id, selector: "table.mainblockcontenttt b"},
  542. //{name: "ILC", link: 'http://www.iloveclassics.com/browse.php?searchin=2&search=' + imdb_id, selector: "#hover-over > tbody > tr.table_col1:gt(0)"},
  543. {name: "IPT", link: 'https://iptorrents.com/t?qf=all&q=' + imdb_id, selector: "#torrents td.ac"},
  544. {name: "JPOP", link: 'https://jpopsuki.eu/torrents.php?searchstr=' + eng_title, selector: "#torrent_table > tbody > tr:gt(0)"},
  545. {name: "NetHD", link: 'http://nethd.org/torrents.php?incldead=1&search_area=4&search=' + imdb_id, selector: "table.table.table-bordered.torrent > tbody > tr:gt(1)"},
  546. {name: "PHD", link: 'https://privatehd.to/torrents?in=1&search=' + ywm, selector: "table.table-condensed.table-striped.table-bordered:first > tbody > tr:gt(0)"},
  547. {name: "PTF", link: 'http://ptfiles.net/browse.php?incldead=0&title=0&search=' + ywm, selector: "#tortable > tbody > tr.rowhead:gt(0)"},
  548. {name: "Red", link: 'https://redacted.ch/torrents.php?searchstr=' + eng_title, selector: "#torrent_table > tbody > tr.group_torrent:gt(0)"},
  549. {name: "SC", link: 'https://secret-cinema.pw/torrents.php?cataloguenumber=' + imdb_id, selector: "div.torrent_card"},
  550. {name: "Speed", link: 'https://speed.cd/browse.php?d=on&search=' + imdb_id, selector: "div.boxContent > table:first >tbody > tr:gt(0)"},
  551. {name: "TD", link: 'https://www.torrentday.com/t?q=' + imdb_id, selector: "#torrentTable td.torrentNameInfo"},
  552. {name: "TS", link: 'https://www.torrentseeds.org/browse.php?searchin=title&incldead=0&search=%22' +eng_title +year + '%22', selector: "table.table.table-bordered > tbody > tr.browse_color:gt(0)"},
  553. {name: "TT", link: 'https://revolutiontt.me/browse.php?search=' + imdb_id, selector: "table#torrents-table > tbody > tr:gt(0)"},
  554. {name:"TL",type:"json",link:"https://www.torrentleech.org/torrents/browse/index/query/" + eng_title + year, ajax: "https://www.torrentleech.org/torrents/browse/list/query/" + eng_title + year, selector:"numFound > 0"},
  555. {name: "UHD",link: 'https://uhdbits.org/torrents.php?searchstr=' + imdb_id, selector: "table.torrent_table > tbody > tr.group"},
  556. {name: "Waffles", link: 'https://waffles.ch/browse.php?q=' + eng_title, selector: "#browsetable:last > tbody > tr:gt(0)"},
  557. {name: "WOP", link: 'http://worldofp2p.net/browse.php?incldead=0&searchin=descr&search=' + imdb_id, selector: "table.yenitorrenttable:last > tbody > tr:gt(0)"},
  558. ]
  559. });
  560. site_map.push({
  561. name: "NZB资源",
  562. label:[
  563. {name: "DOGnzb", link: 'https://dognzb.cr/search?q=' + ywm,selector: "#featurebox > table > tbody > tr > td > table > tbody > tr.odd:gt(0)"},
  564. {name: "LuluNZB", link: 'https://lulunzb.com/search/' + ywm, selector: "#browsetable > tbody > tr:gt(0)", selector_need_login:"div.login-box"},
  565. {name: "Miatrix",link: 'https://www.miatrix.com/search/' + ywm,selector: "#browsetable > tbody > tr:gt(0)"},
  566. {name: "NewzTown",link: 'https://newztown.co.za/search/' + ywm,selector: "#browsetable > tbody > tr:gt(0)"},
  567. {name: "NZBCat",link: 'https://nzb.cat/search/' + ywm,selector: "#browsetable > tbody > tr:gt(0)"},
  568. {name: "NZBgeek",link: 'https://nzbgeek.info/geekseek.php?moviesgeekseek=1&browsecategory=&browseincludewords=' + ywm,selector: "table > tbody > tr.HighlightTVRow2:gt(0)", selector_need_login:"input[value='do_login']"},
  569. {name: "NZBP", link: 'https://nzbplanet.net/search/' + ywm, selector: "#browsetable > tbody > tr:gt(0)"},
  570. {name: "Oznzb", link: 'https://www.oznzb.com/search/' + ywm, selector: "#browsetable > tbody > tr.ratingReportContainer:gt(0)", selector_need_login:"#login"},
  571. {name: "SNZB", link: 'https://simplynzbs.com/search/' + ywm, selector: "#browsetable > tbody > tr:gt(0)"},
  572. ]
  573. });
  574. }
  575. if (ptzimu.trim().length > 0) {
  576. site_map.push({
  577. name: "PT字幕",
  578. label:[
  579. {name:"BYRBT®", link: "https://bt.byr.cn/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table:last > tbody > tr:gt(1)"},
  580. {name:"CHDBits®", link: "https://chdbits.co/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table:last > tbody > tr:gt(1)"},
  581. {name:"CMCT®", link: "https://hdcmct.org/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table:last > tbody > tr:gt(1)"},
  582. {name:"FRDS®", link: "http://pt.keepfrds.com/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
  583. {name:"HDChina®", link: "https://hdchina.org/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table.uploaded_sub_list > tbody > tr:gt(1)"},
  584. {name:"HDCity®", link: "https://hdcity.city/subtitles?notnewword=1&search=" + ptzimu, selector: "center > div:nth-child(1) > table > tbody > tr:nth-child(2)"},
  585. {name:"HDHome®", link: "https://hdhome.org/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table:last > tbody > tr:gt(1)"},
  586. {name:"HDSky®", link: "https://hdsky.me/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table:last > tbody > tr:gt(1)"},
  587. {name:"HDTime®", link: "https://hdtime.org/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='100%'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr"},
  588. {name:"HDU®", link: "http://pt.upxin.net/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
  589. {name:"Hyperay®", link: "https://hyperay.org/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
  590. {name:"JoyHD®", link: "https://www.joyhd.net/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
  591. {name:"MTeam®", link: "https://tp.m-team.cc/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table.table-subtitle-list:last > tbody > tr"},
  592. {name:"NPUBITS®", link: "https://npupt.com/subtitles.php?notnewword=1&search=" + ptzimu, selector: "#main > table > tbody > tr:nth-child(2)"},
  593. {name:"NYPT®", link: "https://nanyangpt.com/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
  594. {name:"OurBits®", link: "https://ourbits.club/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
  595. {name:"SJTU®", link: "https://pt.sjtu.edu.cn/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
  596. {name:"TCCF®", link: "https://et8.org/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
  597. {name:"TLFBits®", link: "http://pt.eastgame.org/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
  598. {name:"U2®", link: "https://u2.dmhy.org/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
  599. {name:"WHUPT®", link: "https://pt.whu.edu.cn/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table.no-vertical-line:last > tbody > tr"},
  600. ]
  601. });
  602. }
  603. }
  604.  
  605. site_map.push({
  606. name: "中文字幕",
  607. label:[
  608. {name:'字幕库', link:'http://www.zimuku.cn/search?q=' + title,selector:'div.box.clearfix div.item.prel.clearfix'},
  609. {name:'字幕天堂',method:"post", link:'http://www.zmtiantang.com/e/search/',data:`keyboard=${title}&show=title&classid=1,3&tempid=1`,headers:{"Content-Type": "application/x-www-form-urlencoded"},rewrite_href:true,selector:'table.data > tbody > tr:nth-child(2)'},
  610. {name:'字幕组', link:'http://www.zimuzu.tv/search/index?type=subtitle&keyword=' + title,selector:".search-result li"},
  611. {name:'sub HD', link:'http://subhd.com/search/' + title,selector:"div.col-md-9 div.box"},
  612. {name:'伪射手', link:'http://assrt.net/sub/?searchword=' + title,selector:"div.body div.subitem"},
  613. {name:'163字幕', link:'http://www.163sub.com/Search?id=' + title,selector:"#main_narrow_bd div.subs_list"},
  614. {name:'电波字幕', link:'http://dbfansub.com/?s=' + title,selector:"div.panel-body article.panel.panel-default.archive"},
  615. {name:'字幕社', link:'https://www.zimushe.com/search.php?keywords=' + title,selector:"div.wrap-l li"},
  616. {name:'中文字幕网', link:'http://www.zimuzimu.com/so_zimu.php?title=' + title,selector:"table.sublist a.othersub"},
  617. {name:'r3sub', link:'https://r3sub.com/search.php?s=' + title,selector:"div.col-sm-8.col-md-9.col-lg-8 div.movie.movie--preview.ddd"},
  618. {name:'HDZIMU', link:'http://www.hdzimu.com/?s=' + title,selector:'div.post-warp div.post-box'},
  619. {name:'M1080', link:'http://zimu.m1080.com/search.asp?a=&s=' + title,selector:"table td"},
  620. {name:'OpenSub', link:'https://www.opensubtitles.org/zh/search/sublanguageid-chi,zht,zhe,eng/imdbid-' + imdb_id,selector:"#search_results tr.change"},
  621. ]
  622. });
  623.  
  624. if(!imdb_id.match(/9999999/)){
  625. site_map.push({
  626. name: "英文字幕",
  627. label:[
  628. {name:'Addic7ed', link:'http://www.addic7ed.com/search.php?search=' + eng_title_clean + year,selector:"table.tabel tr"},
  629. {name:'Podnapisi', link:'https://www.podnapisi.net/zh/subtitles/search/?language=zh&language=en&keywords=' + eng_title_clean + '&' + year + '-' + year,selector:"table tr.subtitle-entry"},
  630. {name:'Subscene', link:'https://subscene.com/subtitles/release?r=true&q=' + ywm,selector:"table td.a1"},
  631. {name:'TVsubs', link:'http://tvsubs.net/search.php?q=' + eng_title_clean,selector:"div.cont li"},
  632. {name:'TVsubtitles', link:'http://www.tvsubtitles.net/search.php?q=' + eng_title_clean,selector:"div.left_articles li"},
  633. {name:'YIFY', link:'http://www.yifysubtitles.com/search?q=' + eng_title_clean,selector:"div.col-sm-12 div.col-xs-12"},
  634. ]
  635. });
  636. }
  637.  
  638. site_map.push({
  639. name: "在线视频",
  640. label:[
  641. {name:'Neets', link:'http://neets.cc/search?key=' + title,selector:'#search_li_box div.search_li.clearfix'},
  642. {name:'爱奇艺视频', link:'https://so.iqiyi.com/so/q_' + title,selector:"div.mod_result a.info_play_btn"},
  643. {name:'次元壁', link:'http://www.ciyuan.bi/Search?keyword=' + title,selector:'div.search_left_container div.search_list_box_right'},
  644. {name:'哈哩哈哩', link:'http://www.halihali.cc/search/?wd=' + title,selector:'#contents div.info'},
  645. {name:'搜狐视频', link:'https://so.tv.sohu.com/mts?wd=' + title,selector:'div.wrap.cfix div.cfix.resource'},
  646. {name:'腾讯视频', link:'https://v.qq.com/x/search/?q=' + title,selector:'div.wrapper_main div._infos'},
  647. {name:'优酷视频', link:'http://www.soku.com/search_video/q_' + title,selector:'div.DIR div.s_info'},
  648. {name:'AAQQS', link:'http://aaxxy.com/vod-search-pg-1-wd-' + title + '.html',selector:'#find-focus li'},
  649. {name:'Q2电影网', link:'http://www.q2002.com/search?wd=' + title,selector:'div.container div.movie-item'},
  650. {name:'魔力电影网', link:'http://www.magbt.net/search.php?searchword=' + title,selector:'#content li.listfl'},
  651. {name:'小朱视频', link:'http://noad.zhuchaoli.club/search/' + title + '.html',selector:'div.b-listtab-main li.item'},
  652. {name:'9ANIME', link:'https://www4.9anime.is/search?keyword=' + eng_title,selector:"div.film-list a.name"},
  653. ]
  654. });
  655.  
  656. site_map.push({
  657. name: "电影资源",
  658. label:[
  659. {name:'52 Movie', link:'http://www.52movieba.com/search.htm?keyword=' + title,selector:'table.table.table-hover.threadlist tr.thread.tap'},
  660. {name:'97电影网', link:'http://www.id97.com/search?q=' + title,selector:'div.container div.col-xs-7'},
  661. {name:'爱下电影网', link:'http://www.aixia.cc/plus/search.php?searchtype=titlekeyword&q=' + title,selector:'div.con li'},
  662. {name:'比特大雄', link:'https://www.btdx8.com/?s=' + title,selector:'#content div.post.clearfix'},
  663. {name:'比特影视', link:'https://www.bteye.com/search/' + title,selector:'#main div.item'},
  664. {name:'电影巴士', link:'http://www.dy8c.com/?s=' + title,selector:'#content div.post-box'},
  665. {name:'电影首发站', link:'http://www.dysfz.cc/key/' + title + '/',selector:'.movie-list li'},
  666. {name:'电影天堂', method:"post", link:'https://www.dy2018.com/e/search/index.php',data:`show=title%2Csmalltext&tempid=1&keyboard=${gtitle}&Submit=%C1%A2%BC%B4%CB%D1%CB%F7`,headers:{"Content-Type": "application/x-www-form-urlencoded"},rewrite_href:true, selector:'div.co_content8 table'},
  667. {name:'嘎嘎影视', link:'http://www.gagays.xyz/movie/search?req%5Bkw%5D=' + title,selector:'#movie-sub-cont-db div.large-movie-detail'},
  668. {name:'高清MP4', link:'http://www.99tvs.com/?s=' + title,selector:'#post_container li'},
  669. {name:'高清电台', link:'https://gaoqing.fm/s.php?q=' + title,selector:'#result1 div.row'},
  670. {name:'高清控', link:'http://www.gaoqingkong.com/?s=' + title,selector:'#post_container div.post_hover'},
  671. {name:'户户盘', method:"post", link:'http://huhupan.com/e/search/index.php',data:`keyboard=${title}&show=title&tempid=1&tbname=news&mid=1&depost=search`,headers:{"Content-Type": "application/x-www-form-urlencoded"},rewrite_href:true, selector:'div.main h2'},
  672. {name:'蓝光网', link:'http://www.languang.co/?s=' + title,selector:'div.mi_cont li'},
  673. {name:'迷你MP4', link:'http://www.minimp4.com/search?q=' + title,selector:'div.container div.col-xs-7'},
  674. {name:'胖鸟电影', link:'http://www.pniao.com/Mov/so/' + title,selector:'div.mainContainer div.movieFlag.eachOne'},
  675. {name:'人生05', link:'http://www.rs05.com/search.php?s=' + title,selector:'#movielist li'},
  676. {name:'云播网', link:'http://www.yunbowang.cn/index.php?m=vod-search&wd=' + title,selector:'div.container div.col-xs-7'},
  677. {name:'中国高清网', link:'http://gaoqing.la/?s=' + title,selector:'div.mainleft div.post_hover'},
  678. {name:'最新影视站', link:'http://www.zxysz.com/?s=' + title,selector:'#content li.p-item'},
  679. ]
  680. });
  681.  
  682. site_map.push({
  683. name: "动漫内站",
  684. label:[
  685. {name:'ACG.RIP', link:'https://acg.rip/?term=' + title,selector:'tbody tr'},
  686. {name:'ACG狗狗', link:'http://bt.acg.gg/search.php?keyword=' + title,selector:'tbody p.original.download'},
  687. {name:'ACG搜', link:'http://www.acgsou.com/search.php?keyword=' + title,selector:'tbody span.bts_1'},
  688. {name:'动漫花园', link:'https://share.dmhy.org/topics/list?keyword=' + title,selector:'tbody span.btl_1'},
  689. {name:'爱恋动漫', link:'http://www.kisssub.org/search.php?keyword=' + title,selector:'tbody span.bts_1'},
  690. {name:'喵搜', link:'https://nyaso.com/dong/' + title +'.html',selector:'tbody a.down'},
  691. {name:'旋风动漫', link:'http://share.xfsub.com:88/search.php?keyword=' + title,selector:'#listTable span.bts_1'},
  692. {name:'怡萱动漫', link:'http://www.yxdm.tv/search.html?title=' + title,selector:'div.main p.stars1'},
  693. ]
  694. });
  695.  
  696. if(!imdb_id.match(/9999999/)){
  697. site_map.push({
  698. name: "动漫外站",
  699. label:[
  700. {name:'AniDex', link:'https://anidex.info/?q=' + eng_title,selector:'div.table-responsive tr'},
  701. {name:'AniRena', link:'https://www.anirena.com/?s=' + eng_title,selector:'#content table'},
  702. {name:'AniTosho', link:'https://animetosho.org/search?q=' + eng_title,selector:'#content div.home_list_entry'},
  703. {name:'Nyaa', link:'https://nyaa.si/?q=' + eng_title,selector:'div.table-responsive tr.default'},
  704. {name:'ニャパンツ', link:'https://nyaa.pantsu.cat/search?c=_&q=' + eng_title,selector:'#torrentListResults tr.torrent-info'},
  705. {name:'东京図书馆', link:'https://www.tokyotosho.info/search.php?terms=' + eng_title,selector:'table.listing td.desc-top'},
  706. ]
  707. });
  708. }
  709.  
  710. site_map.push({
  711. name: "美剧资源",
  712. label:[
  713. {name:'人人影视', link:'http://www.zimuzu.tv/search?type=resource&keyword=' + title,selector:"div.search-result > ul > li"},
  714. {name:'人人美剧', link:'http://www.yyetss.com/Search/index/s_keys/' + title,selector:'div.row div.col-xs-3'},
  715. {name:'天天美剧', link:'http://www.ttmeiju.vip/index.php/search/index.html?keyword=' + title,selector:'table.latesttable tr.Scontent1'},
  716. {name:'爱美剧', link:'https://22v.net/search/' + title,selector:'div.movie span'},
  717. {name:'天天看美剧', link:'http://www.msj1.com/?s=' + title,selector:'div.cat_list div.art_show_top'},
  718. {name:'美剧粉', link:'http://www.itvfans.com/?s=' + title,selector:'#main-wrap-left div.home-blog-entry-text'},
  719. ]
  720. });
  721.  
  722. site_map.push({
  723. name: "BT内站",
  724. label:[
  725. {name:'BT吧', link:'http://www.btba.com.cn/search?keyword=' + title,selector:'div.left li'},
  726. {name:'BT蚂蚁', link:'https://www.btmyi.com/search.html?kw=' + title,selector:"div.row h5.item-title"},
  727. {name:'BT天堂', link:'http://www.bttt.la/s.php?q=' + title,selector:'div.ml div.title'},
  728. {name:'BT之家', link:'http://www.btbtt.co/search-index-keyword-' + title + '.htm',selector:'#threadlist table'},
  729. {name:'RARBT', link:'http://www.rarbt.com/index.php/search/index.html?search=' + title,selector:'div.ml div.title'},
  730. {name:'查片源', link:'https://www.chapianyuan.com/?keyword=' + title,selector:'div.block li'},
  731. {name:'磁力猫', link:'http://www.cilimao.me/search?word=' + title,selector:'#Search__content_left___2MajJ div.MovieCard__content___3kv1W'}, // TODO check
  732. {name:'磁力站', link:'http://oabt004.com/index/index?c=&k=' + title,selector:'div.link-list-wrapper ul.link-list'},
  733. {name:'光影资源', link:'http://www.etdown.net/index.php?keyword=' + title,selector:'tbody.list_4 tr'},
  734. {name:'我爱P2P', link:'http://www.woaip2p.net/topic/list?categoryId=0&title=' + title,selector:'tbody td.word-break'},
  735. {name:'小浣熊下载', link:'https://www.xiaohx.org/search?key=' + title,selector:'div.search_right li'},
  736. {name:'一站搜', link:'http://v.yizhansou.com/search?kw=' + title,selector:'table td.st'},
  737. ]
  738. });
  739.  
  740. if(!imdb_id.match(/9999999/)){
  741. site_map.push({
  742. name: "BT外站",
  743. label:[
  744. {name:'1337X', link:'https://1337x.to/search/' + ywm + '/1/',selector:'table.table-list.table.table-responsive.table-striped td.coll-1.name'},
  745. {name:'BT-Scene', link:'https://bt-scene.cc/results_.php?q=' + ywm,selector:'table.tor td.tname'},
  746. {name:'iDope', link:'https://idope.se/torrent-list/' + ywm,selector:'#div2child div.resultdiv'},
  747. {name:'ISOHunt', link:'https://isohunt2.net/torrent/?ihq=' + ywm,selector:'#serps td.title-row'},
  748. {name:'KickAss', link:'https://katcr.co/katsearch/page/1/' + ywm,selector:'div.table--responsive_vertical div.torrents_table__torrent_name'},
  749. {name:'Lime', link:'https://www.limetorrents.cc/search/all/' + ywm,selector:'table.table2 div.tt-name'},
  750. {name:'RARBG', link:'http://rarbg.is/torrents.php?search=' + imdb_id,selector:'table.lista2t tr.lista2'},
  751. {name:'TorLock', link:'https://www.torlock2.com/all/torrents/' + ywm.replace(/ /g,"-") +'.html',selector:'table.table.table-striped.table-bordered.table-hover.table-condensed td.td'},
  752. {name:'WorldWide', link:'https://worldwidetorrents.me/torrents-search.php?search=' + ywm,selector:'div.w3-responsive td.w3-jose'},
  753. {name:'Zooqle', link:'https://zooqle.com/search?q=' + ywm,selector:'div.panel-body a.small'},
  754. {name:'海盗湾', link:'https://thepiratebay.org/search/' + ywm,selector:'#searchResult div.detName'},
  755. ]
  756. });
  757. }
  758. } else if (location.host === "book.douban.com") {
  759. let title = encodeURI($('#wrapper > h1 > span')[0].textContent);
  760. site_map.push({
  761. name: "PT内站",
  762. label: [
  763. {name: "BTSchool", link: 'http://pt.btschool.net/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + title,/* selector: "table.torrents:last > tbody > tr:gt(0)"}, */},
  764. {name: "BYRBT", link: 'https://bt.byr.cn/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + title,},
  765. ]
  766. });
  767. } else if (location.host === "music.douban.com") {
  768. let title = encodeURI($('#wrapper > h1 > span')[0].textContent);
  769. site_map.push({
  770. name: "PT内站",
  771. label: [
  772. {name: "BTSchool", link: 'http://pt.btschool.net/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + title,/* selector: "table.torrents:last > tbody > tr:gt(0)"}, */},
  773. {name: "BYRBT", link: 'https://bt.byr.cn/torrents.php?incldead=1&search_area=1&notnewword=1&search=' + title,},
  774. ]
  775. });
  776. }
  777.  
  778.  
  779. function Exist_check(label) {
  780. let site = label.name;
  781. let psite = $(`a[data-name="${site}"]`);
  782.  
  783. function TagExist(link){
  784. $(psite).css("background-color", GM_getValue("tag_bcolor_exist","#e3f1ed"));
  785. $(psite).css("color", GM_getValue("tag_fcolor_exist","#3377aa"));
  786. $(psite).attr("title","资源存在");
  787. let storage_data = true;
  788. if (label.rewrite_href && label.rewrite_href === true) { // 重写链接
  789. storage_data = GM_getCacheValue(`${douban_id}_${site}`, link || $(psite).attr("href"),false);
  790. $(psite).attr("href",storage_data);
  791. }
  792. GM_setCacheValue(`${douban_id}_${site}`,storage_data,86400 * 7 * 1e3,false);
  793. }
  794.  
  795. function TagNotExist() {
  796. $(psite).css("background-color", GM_getValue("tag_bcolor_not_exist","#f4eac2"));
  797. $(psite).css("color", GM_getValue("tag_fcolor_not_exist","#3377aa"));
  798. $(psite).attr("title","资源不存在");
  799. }
  800.  
  801. function TagNeedLogin() {
  802. $(psite).css("background-color", GM_getValue("tag_bcolor_need_login",""));
  803. $(psite).css("color", GM_getValue("tag_fcolor_need_login","#3377aa"));
  804. GM_setCacheValue(`need_login_${site}`,true, 86400 * 1e3);
  805. $(psite).click(function () {
  806. GM_deletedCacheValue(`need_login_${site}`);
  807. });
  808. $(psite).attr("title","站点需要登陆");
  809. }
  810.  
  811. function TagError() {
  812. $(psite).css("background-color", GM_getValue("tag_bcolor_error",""));
  813. $(psite).css("color", GM_getValue("tag_fcolor_error","#3377aa"));
  814. $(psite).attr("title", "遇到问题");
  815. }
  816.  
  817.  
  818. // 这里假定有这个资源的就一直都有,直接使用第一次请求成功的时候缓存信息
  819. if (GM_getCacheValue(`${douban_id}_${site}`, false)) {
  820. TagExist();
  821. return;
  822. }
  823.  
  824. // 如果前次检查到这个站点需要登陆
  825. if (GM_getCacheValue(`need_login_${site}`, false)) {
  826. TagNeedLogin();
  827. return;
  828. }
  829.  
  830. // 不然,则请求相关信息
  831. $(psite).attr("title", "正在请求信息中");
  832. GM_xmlhttpRequest({
  833. method: label.method || "GET",
  834. url: label.ajax || label.link,
  835. data: label.data,
  836. headers: label.headers,
  837. onload: function (res) {
  838. if (/login|verify|checkpoint|returnto/ig.test(res.finalUrl)) {
  839. TagNeedLogin(); // 检查最终的URL看是不是需要登陆
  840. } else if (/refresh: \d+; url=.+login.+/ig.test(res.responseHeaders)){
  841. TagNeedLogin(); // 检查responseHeader有没有重定向
  842. } else {
  843. let responseText = res.responseText;
  844. // if (label.name==="AT") {console.log(label.name);console.log(res.finalUrl);console.log(res.responseHeaders);console.log(res.responseText);}
  845. if (typeof responseText === "undefined") {
  846. TagNeedLogin(); // 检查最终的Text,如果什么都没有也可能说明需要登陆
  847. } else if (responseText.length <800 && /login/.test(responseText)) {
  848. TagNeedLogin(); // 对Text进行检查,断言“过短,且中间出现login字段”即说明可能需要登陆
  849. } else { // 开始解析返回信息
  850. try {
  851. TagNotExist(); // 先断言不存在
  852. if (label.type && label.type === "json") { // 如果前面定义了返回类型是 "json"
  853. let par = JSON.parse(responseText);
  854. if (eval("par." + label.selector)) {
  855. TagExist();
  856. }
  857. } else { // 否则默认label.type的默认值为 html
  858. let doc = (new DOMParser()).parseFromString(res.responseText, 'text/html');
  859. let body = doc.querySelector("body");
  860. // 因为jQuery的选择器丰富,故这里不用 dom.querySelector() 而用 jQuery.find()
  861. if (label.selector_need_login && $(body).find(label.selector_need_login).length){
  862. TagNeedLogin(); // 如果存在selector_need_login选择器,则先判断是否存在以确定是否需要登录
  863. } else if ($(body).find(label.selector || "table.torrents:last > tbody > tr:gt(0)").length) {
  864. TagExist(res.finalUrl); // 最后使用selector选择器判断资源是否存在
  865. }
  866. }
  867. } catch (e) {
  868. TagError();
  869. }
  870. }
  871. }
  872. },
  873. onerror: function () {
  874. TagError();
  875. }
  876. });
  877. }
  878.  
  879. function site_exist_status() {
  880. for (let i = 0; i < site_map.length; i++) {
  881. let map_dic = site_map[i];
  882. if (GM_getValue(delete_site_prefix + map_dic.name,false)) {
  883. continue;
  884. }
  885. $('#content div.tags').before(`<div class="c-aside name-offline" data-id="${i}"><h2><i>${map_dic.name}</i>· · · · · ·</h2><div class=c-aside-body style="padding: 0 12px;"> <ul class=bs > </ul> </div> </div>`);
  886.  
  887. let in_site_html = $(`div[data-id='${i}'] ul.bs`);
  888. for (let j = 0; j < map_dic.label.length; j++) {
  889. let label = map_dic.label[j];
  890. if (GM_getValue(delete_site_prefix + label.name,false)) {
  891. continue;
  892. }
  893. in_site_html.append(`<a href="${label.link}" data-name="${label.name}" target="_blank" rel="nofollow" class="name-offline">${label.name}</a>`);
  894. Exist_check(label)
  895. }
  896. }
  897. }
  898. site_exist_status();
  899. });
Add Comment
Please, Sign In to add comment