├── src ├── icon.png ├── icon-19.png ├── icon-64.png ├── icon-128.png ├── jquery │ ├── images │ │ ├── animated-overlay.gif │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ ├── ui-icons_cd0a0a_256x240.png │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ └── ui-bg_highlight-soft_75_cccccc_1x100.png │ └── jquery-ui-1.10.3.custom.min.css ├── i18n.js ├── manifest.json ├── popup.html ├── popup.js ├── search.html ├── _locales │ ├── en │ │ └── messages.json │ └── zh_CN │ │ └── messages.json ├── script │ ├── plugin │ │ ├── utorrent.js │ │ ├── Base64.js │ │ ├── deluge.js │ │ ├── transmission.js │ │ └── FileSaver.js │ ├── public.js │ ├── background.js │ └── options.js ├── search.js ├── extension │ ├── init.js │ └── base.css └── options.html ├── PT-Plugin.png ├── README.md ├── .gitignore └── resource ├── config ├── sites │ ├── chdbits.co.json │ ├── hdcmct.org.json │ ├── ourbits.club.json │ ├── hdchina.org.json │ ├── pt.btschool.net.json │ ├── u2.dmhy.org.json │ ├── open.cd.json │ └── totheglory.im.json └── siteTypes │ ├── TTG.json │ └── NexusPHP.json └── default.json /src/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PT-Fans/PT-Plugin/HEAD/src/icon.png -------------------------------------------------------------------------------- /PT-Plugin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PT-Fans/PT-Plugin/HEAD/PT-Plugin.png -------------------------------------------------------------------------------- /src/icon-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PT-Fans/PT-Plugin/HEAD/src/icon-19.png -------------------------------------------------------------------------------- /src/icon-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PT-Fans/PT-Plugin/HEAD/src/icon-64.png -------------------------------------------------------------------------------- /src/icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PT-Fans/PT-Plugin/HEAD/src/icon-128.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 注意 2 | 本项目已升级为 PT助手Plus,即日起本项目将停止更新,请移步到新项目地址 https://github.com/ronggang/PT-Plugin-Plus 3 | 4 | 栽培者 2019.01.20 5 | -------------------------------------------------------------------------------- /src/jquery/images/animated-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PT-Fans/PT-Plugin/HEAD/src/jquery/images/animated-overlay.gif -------------------------------------------------------------------------------- /src/jquery/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PT-Fans/PT-Plugin/HEAD/src/jquery/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /src/jquery/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PT-Fans/PT-Plugin/HEAD/src/jquery/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /src/jquery/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PT-Fans/PT-Plugin/HEAD/src/jquery/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /src/jquery/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PT-Fans/PT-Plugin/HEAD/src/jquery/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /src/jquery/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PT-Fans/PT-Plugin/HEAD/src/jquery/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /src/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PT-Fans/PT-Plugin/HEAD/src/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /src/jquery/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PT-Fans/PT-Plugin/HEAD/src/jquery/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /src/jquery/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PT-Fans/PT-Plugin/HEAD/src/jquery/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /src/jquery/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PT-Fans/PT-Plugin/HEAD/src/jquery/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /src/jquery/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PT-Fans/PT-Plugin/HEAD/src/jquery/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /src/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PT-Fans/PT-Plugin/HEAD/src/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /src/jquery/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PT-Fans/PT-Plugin/HEAD/src/jquery/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.tmp 2 | *.bkp 3 | *.vscode 4 | *.bat 5 | node_modules 6 | package.json 7 | Gruntfile.js 8 | .DS_Store 9 | *.pem 10 | *.crx 11 | *.zip -------------------------------------------------------------------------------- /resource/config/sites/chdbits.co.json: -------------------------------------------------------------------------------- 1 | {"allowSearch":true,"detailScript":"","dropScript":"","listAllTorrentUrlScript":"","site":"chdbits.co","tags":[],"type":"NexusPHP"} -------------------------------------------------------------------------------- /resource/config/sites/hdcmct.org.json: -------------------------------------------------------------------------------- 1 | {"allowSearch":true,"detailScript":"","dropScript":"","listAllTorrentUrlScript":"","site":"hdcmct.org","tags":[],"type":"NexusPHP"} -------------------------------------------------------------------------------- /src/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PT-Fans/PT-Plugin/HEAD/src/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /resource/config/sites/ourbits.club.json: -------------------------------------------------------------------------------- 1 | {"allowSearch":true,"detailScript":"","disableHttps":false,"dropScript":"","listAllTorrentUrlScript":"","site":"ourbits.club","tags":["电影"],"type":"NexusPHP"} -------------------------------------------------------------------------------- /resource/config/sites/hdchina.org.json: -------------------------------------------------------------------------------- 1 | {"allowSearch":true,"detailScript":"","disableHttps":false,"dropScript":"","listAllTorrentUrlScript":"","site":"hdchina.org","tags":["音乐","电影"],"type":"NexusPHP"} -------------------------------------------------------------------------------- /resource/config/sites/pt.btschool.net.json: -------------------------------------------------------------------------------- 1 | {"allowHttps":false,"allowSearch":true,"detailScript":"","disableHttps":true,"dropScript":"","listAllTorrentUrlScript":"","site":"pt.btschool.net","tags":[],"type":"NexusPHP"} -------------------------------------------------------------------------------- /resource/config/sites/u2.dmhy.org.json: -------------------------------------------------------------------------------- 1 | { 2 | "allowSearch": true, 3 | "detailScript": "", 4 | "dropScript": "", 5 | "folders": [""], 6 | "listAllTorrentUrlScript": "", 7 | "passkey": "", 8 | "site": "u2.dmhy.org", 9 | "tags": ["动漫"], 10 | "type": "NexusPHP" 11 | } -------------------------------------------------------------------------------- /resource/config/sites/open.cd.json: -------------------------------------------------------------------------------- 1 | { 2 | "allowSearch": true, 3 | "defaultFolder": "", 4 | "detailScript": "", 5 | "dropScript": "", 6 | "folders": [], 7 | "listAllTorrentUrlScript": "", 8 | "passkey": "", 9 | "site": "open.cd", 10 | "tags": ["音乐"], 11 | "type": "NexusPHP" 12 | } -------------------------------------------------------------------------------- /src/i18n.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | var items = $("[system-lang]"); 3 | for (var i=0;i< items.length; i++) { 4 | var item = $(items[i]); 5 | var key = item.attr("system-lang"); 6 | if (key) { 7 | var text = chrome.i18n.getMessage(key); 8 | if (text) { 9 | if (item.find(".ui-button-text").length>0) { 10 | item.find(".ui-button-text").html(text); 11 | } else { 12 | item.html(text); 13 | } 14 | } 15 | } 16 | } 17 | }); -------------------------------------------------------------------------------- /resource/config/sites/totheglory.im.json: -------------------------------------------------------------------------------- 1 | { 2 | "allowSearch": true, 3 | "detailScript": "(new RegExp(/t\\/(\\d+)\\//g)).exec(location.href);var id=RegExp.$1;(\"$input-host$rssdd.php?par=\"+(new Base64).encode(\"vvv\"+id+\"|||$input-passkey$zz\"));", 4 | "dropScript": "(new RegExp(/t\\/(\\d+)\\//g)).exec(\"$input-url$\");var id=RegExp.$1;(\"$host$rssdd.php?par=\"+(new Base64).encode(\"vvv\"+id+\"|||$input-passkey$zz\"));", 5 | "folders": [""], 6 | "listAllTorrentUrlScript": "$.map($(\"a[href^='/t/']\").toArray(),function(n){(new RegExp(/t\\/(\\d+)\\//g)).exec($(n).attr(\"href\"));var id=RegExp.$1;return (\"$host$rssdd.php?par=\"+(new Base64).encode(\"vvv\"+id+\"|||$input-passkey$zz\"));});", 7 | "passkey": "", 8 | "site": "totheglory.im", 9 | "tags": ["电影", "游戏"], 10 | "type": "TTG" 11 | } -------------------------------------------------------------------------------- /resource/config/siteTypes/TTG.json: -------------------------------------------------------------------------------- 1 | {"name":"TTG","searchPage":"/browse.php?search_field=$key$&c=M","searchResultType":"html","getSearchResultScript":"var items = $(result).find('#torrent_table tr.hover_hr');\nvar datas = [];\n$.each(items, function(index, item) {\n\titem = $(item);\n\tvar id = item.attr(\"id\");\n\tvar url=\"https://\"+site+\"/rssdd.php?par=\"+(new Base64).encode(\"vvv\"+id+\"|||\"+system.getSite(site).passkey+\"zz\");\n\tvar data = {\n\t\ttitle: item.find(\".name_left a\").html(),\n\t\tlink: \"https://\"+site+item.find(\".name_left a\").attr(\"href\"),\n\t\tdownloadURL: url,\n\t\tsize: item.find(\"td:eq(6)\").text().replace(\"\\n\",\" \"),\n\t\tdate: item.find(\"td:eq(4)\").html(),\n\t\tauthor: item.find(\"td:eq(9)\").text(),\n\t\tsource: site\n\t};\n\tdatas.push(data);\n});\n\nsystem.addSearchResult(datas);","getTorrentTotalSizeScript":"$(\"#torrent_table\").find(\"td:contains('MB'),td:contains('GB'),td:contains('TB')\")","pluginIconShowPages":["/browse.php"],"torrentListPages":["*://*/browse.php*"],"torrentDetailPages":["https://totheglory.im/t/*"],"torrentLinks":["https://totheglory.im/t/*"]} -------------------------------------------------------------------------------- /resource/config/siteTypes/NexusPHP.json: -------------------------------------------------------------------------------- 1 | {"name":"NexusPHP","searchPage":"/torrentrss.php?rows=$rows$&ismalldescr=1&search=$key$&search_mode=1&nd=1&passkey=$passkey$","searchResultType":"xml","getSearchResultScript":"var items = $(result).find('item');\nvar datas = [];\n$.each(items, function(index, item) {\n\titem = $(item);\n\tvar data = {\n\t\ttitle: item.find(\"title\").text(),\n\t\tlink: item.find(\"link\").text(),\n\t\tdownloadURL: item.find(\"enclosure\").attr(\"url\")+\"&passkey=\"+system.getSite(site).passkey,\n\t\tsize: formatSize(item.find(\"enclosure\").attr(\"length\")),\n\t\tdate: (new Date(item.find(\"pubDate\").text())).toLocaleString(),\n\t\tauthor: item.find(\"author\").text(),\n\t\tsource: site\n\t};\n\tdatas.push(data);\n});\n\nsystem.addSearchResult(datas);","getTorrentTotalSizeScript":"$(\".torrents\").find(\"td:contains('MB'),td:contains('GB'),td:contains('TB')\")","pluginIconShowPages":["/torrents.php"],"torrentListPages":["*://*/torrents.php*"],"torrentDetailPages":["*://*/details.php*","*://*/plugin_details.php*"],"torrentLinks":["*://*/details.php*","*://*/download.php*","*://*/plugin_details.php*"]} -------------------------------------------------------------------------------- /src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "__MSG_manifest_appName__", 3 | "short_name": "__MSG_manifest_shortName__", 4 | "version": "0.0.9", 5 | "description": "__MSG_manifest_appDescription__", 6 | "manifest_version": 2, 7 | "default_locale": "zh_CN", 8 | "browser_action": { 9 | "default_icon": "icon-19.png", 10 | "default_title": "__MSG_manifest_appName__", 11 | "default_popup": "popup.html" 12 | }, 13 | "permissions": [ 14 | "tabs", 15 | "*://*/*", 16 | "clipboardRead", 17 | "clipboardWrite", 18 | "storage", 19 | "contextMenus" 20 | ], 21 | "icons": { 22 | "16": "icon.png", 23 | "19": "icon-19.png", 24 | "64": "icon-64.png", 25 | "128": "icon-128.png" 26 | }, 27 | "options_page": "options.html", 28 | "background": { 29 | "scripts": [ 30 | "jquery/jquery-1.9.1.min.js", 31 | "script/public.js", 32 | "script/plugin/Base64.js", 33 | "script/plugin/transmission.js", 34 | "script/plugin/utorrent.js", 35 | "script/plugin/deluge.js", 36 | "script/background.js" 37 | ] 38 | }, 39 | "content_scripts": [{ 40 | "matches": [ 41 | "*://*/*" 42 | ], 43 | "css": ["extension/base.css"], 44 | "js": [ 45 | "jquery/jquery-1.9.1.min.js", 46 | "script/public.js", 47 | "script/plugin/Base64.js", 48 | "extension/init.js" 49 | ] 50 | }], 51 | "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'" 52 | } -------------------------------------------------------------------------------- /src/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 41 | 42 | 46 |

47 |
[参数配置] [访问网站]
48 | 49 | -------------------------------------------------------------------------------- /src/popup.js: -------------------------------------------------------------------------------- 1 | var system = { 2 | config: {}, 3 | init: function(){ 4 | $("#btnSearch").click(function(event) { 5 | system.search(); 6 | }); 7 | 8 | $("#options").click(function(event) { 9 | chrome.extension.sendMessage({ 10 | action: "open-options" 11 | }); 12 | }); 13 | 14 | $("#search-key").on("keyup",function(e){ 15 | if (e.keyCode==13) 16 | { 17 | system.search(); 18 | } 19 | }); 20 | 21 | chrome.extension.sendMessage({ 22 | action: "read-config" 23 | },function(config){ 24 | system.config = config; 25 | $("#search-key").val(config.search.key); 26 | system.initTags(); 27 | }); 28 | }, 29 | search: function(){ 30 | this.config.search.checkedTags = $.map($("#tags input:checked"),function(n){return $(n).attr("tag");}); 31 | chrome.extension.sendMessage({ 32 | action: "save-config", 33 | config: this.config 34 | }); 35 | chrome.extension.sendMessage({ 36 | action: "search-torrent", 37 | key: $("#search-key").val() 38 | }); 39 | }, 40 | // 初始标签 41 | initTags: function() { 42 | var tags = {}; 43 | if ($.isArray(this.config.search.checkedTags)) 44 | { 45 | $.each(this.config.search.checkedTags, function(index,item){ 46 | tags[item] = true; 47 | }); 48 | } 49 | 50 | var parent = $("#tags"); 51 | parent.empty(); 52 | 53 | $.each(this.config.search.tags, function(index,item){ 54 | $("").attr("tag",item).prop("checked",(tags[item]?true:false)).appendTo(parent); 55 | $("