|
114 | 114 | // @include http*://greasyfork.org/*/scripts/* |
115 | 115 | // @include http*://sleazyfork.org/*/forum/*discussion* |
116 | 116 | // @include http*://greasyfork.org/*/forum/*discussion* |
117 | | -// @version 3.22.68 |
| 117 | +// @version 3.22.69 |
118 | 118 | // @grant GM_notification |
119 | 119 | // @grant GM_xmlhttpRequest |
120 | 120 | // @grant GM_setClipboard |
121 | 121 | // @grant GM_setValue |
122 | 122 | // @grant GM_getValue |
123 | 123 | // @grant unsafeWindow |
124 | 124 | // @run-at document-end |
125 | | -// @require https://greasyfork.org/scripts/23522/code/od.js |
| 125 | +// @require https://greasyfork.org/scripts/23522/code/od.js?version=997431 |
126 | 126 | // @require https://cdn.jsdelivr.net/crypto-js/3.1.2/components/core-min.js |
127 | 127 | // @require https://cdn.jsdelivr.net/crypto-js/3.1.2/rollups/aes.js |
128 | 128 | // @license MIT License |
|
914 | 914 | $(document).ready(function() { register_qrcode_event('#qrcode_magnet', '#qrcode_magnet_enlarged'); |
915 | 915 | register_qrcode_event('#qrcode_download', '#qrcode_download_enlarged'); }); } else if (Config['user_script']['platform'] == 'mobile') { $('#torrent_url').attr('href', torrent_url.full).text('种子下载').click(function() { return (prompt('确认下载该种子', torrent_url.full) ? true : false); }); |
916 | 916 | $('#magnet_url').attr('href', magnet_url.full).text('磁力下载').click(function() { return (prompt('确认下载磁链', magnet_url.full) ? true : false); }); } else { return false; } |
917 | | - })(jQuery); |
| 917 | + })(unsafeWindow.jQuery); |
918 | 918 | } |
919 | 919 | }, |
920 | 920 | { |
|
947 | 947 | $(document).ready(function() { register_qrcode_event('#qrcode_magnet', '#qrcode_magnet_enlarged'); |
948 | 948 | register_qrcode_event('#qrcode_download', '#qrcode_download_enlarged'); }); } else if (Config['user_script']['platform'] == 'mobile') { $('#torrent_url').attr('href', torrent_url.full).text('种子下载').click(function() { return (prompt('确认下载该种子', torrent_url.full) ? true : false); }); |
949 | 949 | $('#magnet_url').attr('href', magnet_url.full).text('磁力下载').click(function() { return (prompt('确认下载磁链', magnet_url.full) ? true : false); }); } else { return false; } |
950 | | - })(jQuery); |
| 950 | + })(unsafeWindow.jQuery); |
951 | 951 | } |
952 | 952 | }, |
953 | 953 | { |
954 | 954 | name:"漫猫", |
955 | 955 | url:"http://comicat.org/", |
956 | 956 | regex:/comicat\./, |
957 | 957 | run:function(){ |
958 | | - var acgscript_config = { "miobt": { "4": { "api_url": "http://v2.uploadbt.com" } } }; |
959 | 958 | (function($) { |
960 | | - if (acgscript_config['miobt']['4']['loaded']) { return false; } |
| 959 | + var acgscript_config = { |
| 960 | + "miobt": { |
| 961 | + "4": { |
| 962 | + "api_url": "http://v2.uploadbt.com", |
| 963 | + "source": "cdn.acgscript.com" |
| 964 | + } |
| 965 | + } |
| 966 | + }; |
| 967 | + if (acgscript_config['miobt']['4']['loaded']) { |
| 968 | + return false; |
| 969 | + } |
961 | 970 | acgscript_config['miobt']['4']['loaded'] = true; |
962 | 971 | var log_name = 'acgscript/miobt/bt_download'; |
963 | | - console.log([log_name, { 'loaded': acgscript_config['miobt']['4']['loaded'], 'api_url': acgscript_config['miobt']['4']['api_url'], 'mika_mode': Config['mika_mode']['enabled'], 'in_script': Config['in_script'], 'platform': Config['user_script']['platform'] }]); |
964 | | - if (!Config['mika_mode']['enabled']) { return false; } |
965 | | - if (Config['in_script'] !== 'show') { return false; } |
966 | | - if (!$('#box_download')) { return false; } |
| 972 | + console.log([log_name, { |
| 973 | + 'source': acgscript_config['miobt']['4']['source'], |
| 974 | + 'loaded': acgscript_config['miobt']['4']['loaded'], |
| 975 | + 'api_url': acgscript_config['miobt']['4']['api_url'], |
| 976 | + 'mika_mode': Config['mika_mode']['enabled'], |
| 977 | + 'in_script': Config['in_script'], |
| 978 | + 'platform': Config['user_script']['platform'] |
| 979 | + }]); |
| 980 | + if (!Config['mika_mode']['enabled']) { |
| 981 | + return false; |
| 982 | + } |
| 983 | + if (Config['in_script'] !== 'show') { |
| 984 | + return false; |
| 985 | + } |
| 986 | + if (!$('#box_download')) { |
| 987 | + return false; |
| 988 | + } |
967 | 989 | var api_url = acgscript_config['miobt']['4']['api_url']; |
968 | | - var torrent_url = { "lite": api_url + '/?r=down&hash=' + Config['hash_id'], 'full': api_url + '/?r=down&hash=' + Config['hash_id'] + '&name=' + Config['down_torrent_format'].replace('%s', Config['bt_data_title']) }; |
969 | | - var magnet_url = { 'lite': 'magnet:?xt=urn:btih:' + Config['hash_id'], 'full': 'magnet:?xt=urn:btih:' + Config['hash_id'] + '&tr=' + Config['announce'] }; |
970 | | - if (Config['user_script']['platform'] == 'desktop') { $('#box_download h2.title').text('下载地址'); |
| 990 | + var torrent_url = { |
| 991 | + "lite": api_url + '/?r=down&hash=' + Config['hash_id'], |
| 992 | + 'full': api_url + '/?r=down&hash=' + Config['hash_id'] + '&name=' + Config['down_torrent_format'].replace('%s', Config['bt_data_title']) |
| 993 | + }; |
| 994 | + var magnet_url = { |
| 995 | + 'lite': 'magnet:?xt=urn:btih:' + Config['hash_id'], |
| 996 | + 'full': 'magnet:?xt=urn:btih:' + Config['hash_id'] + '&tr=' + Config['announce'] |
| 997 | + }; |
| 998 | + if (Config['user_script']['platform'] == 'desktop') { |
| 999 | + $('#box_download h2.title').text('下载地址'); |
971 | 1000 | $('#magnet').attr('href', magnet_url.full).text('磁链下载'); |
972 | 1001 | $('#download').attr('href', torrent_url.full).text('种子下载'); |
973 | 1002 | $('#qrcode_magnet').removeAttr('href').text('磁链扫码'); |
974 | 1003 | $('#qrcode_download').removeAttr('href').text('种子扫码'); |
975 | 1004 | $('#qrcode_magnet_enlarged').attr('qr_content', magnet_url.full); |
976 | | - $('#qrcode_download_enlarged').attr('qr_content', torrent_url.lite); var register_qrcode_event = function(sel, sel_enlarged) { $(sel).click(function() { $('.qrcode_enlarged').html('').hide(); |
977 | | - $(sel_enlarged).qrcode({ render: "canvas", size: 256, fill: '#0480BE', background: '#FFF', quiet: 1, mode: 2, minVersion: 10, label: $(sel_enlarged).attr('qr_label'), fontname: '"Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif', fontcolor: 'darkorange', text: $(sel_enlarged).attr('qr_content') }); |
978 | | - $(sel_enlarged).fadeIn(200); }); |
979 | | - $(sel_enlarged).click(function() { $(this).hide(); }); }; |
980 | | - $(document).ready(function() { register_qrcode_event('#qrcode_magnet', '#qrcode_magnet_enlarged'); |
981 | | - register_qrcode_event('#qrcode_download', '#qrcode_download_enlarged'); }); } else if (Config['user_script']['platform'] == 'mobile') { $('#torrent_url').attr('href', torrent_url.full).text('种子下载').click(function() { return (prompt('确认下载该种子', torrent_url.full) ? true : false); }); |
982 | | - $('#magnet_url').attr('href', magnet_url.full).text('磁力下载').click(function() { return (prompt('确认下载磁链', magnet_url.full) ? true : false); }); } else { return false; } |
983 | | - })(jQuery); |
| 1005 | + $('#qrcode_download_enlarged').attr('qr_content', torrent_url.lite); |
| 1006 | + var register_qrcode_event = function(sel, sel_enlarged) { |
| 1007 | + $(sel).click(function() { |
| 1008 | + $('.qrcode_enlarged').html('').hide(); |
| 1009 | + $(sel_enlarged).qrcode({ |
| 1010 | + render: "canvas", |
| 1011 | + size: 256, |
| 1012 | + fill: '#0480BE', |
| 1013 | + background: '#FFF', |
| 1014 | + quiet: 1, |
| 1015 | + mode: 2, |
| 1016 | + minVersion: 10, |
| 1017 | + label: $(sel_enlarged).attr('qr_label'), |
| 1018 | + fontname: '"Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif', |
| 1019 | + fontcolor: 'darkorange', |
| 1020 | + text: $(sel_enlarged).attr('qr_content') |
| 1021 | + }); |
| 1022 | + $(sel_enlarged).fadeIn(200); |
| 1023 | + }); |
| 1024 | + $(sel_enlarged).click(function() { |
| 1025 | + $(this).hide(); |
| 1026 | + }); |
| 1027 | + }; |
| 1028 | + $(document).ready(function() { |
| 1029 | + register_qrcode_event('#qrcode_magnet', '#qrcode_magnet_enlarged'); |
| 1030 | + register_qrcode_event('#qrcode_download', '#qrcode_download_enlarged'); |
| 1031 | + }); |
| 1032 | + } else if (Config['user_script']['platform'] == 'mobile') { |
| 1033 | + $('#torrent_url').attr('href', torrent_url.full).text('种子下载').click(function() { |
| 1034 | + return (prompt('确认下载该种子', torrent_url.full) ? true : false); |
| 1035 | + }); |
| 1036 | + $('#magnet_url').attr('href', magnet_url.full).text('磁力下载').click(function() { |
| 1037 | + return (prompt('确认下载磁链', magnet_url.full) ? true : false); |
| 1038 | + }); |
| 1039 | + } else { |
| 1040 | + return false; |
| 1041 | + } |
| 1042 | + })(unsafeWindow.jQuery); |
984 | 1043 | } |
985 | | - }, |
986 | | - { |
| 1044 | + } |
| 1045 | + /*{ |
987 | 1046 | name:"Reddit", |
988 | 1047 | url:"https://www.reddit.com/r/SwitchNSPs", |
989 | 1048 | regex:/reddit\.com/, |
|
1018 | 1077 | decodeBase64(); |
1019 | 1078 | }); |
1020 | 1079 | } |
1021 | | - } |
| 1080 | + }*/ |
1022 | 1081 | /*{ |
1023 | 1082 | name:"咻咻动漫", |
1024 | 1083 | url:"http://www.xiu.moe/", |
|
0 commit comments