forked from ytzong/UserScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
btkitty-magnet-to-torrent.user.js
32 lines (30 loc) · 1.18 KB
/
btkitty-magnet-to-torrent.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// ==UserScript==
// @name BTKitty Magnet to Torrent
// @namespace http://twitter.com/ytzong
// @version 1.5
// @description BTKitty Magnet to Torrent
// @author ytzong
// @include http://btkitty.*/*
// @include http://storebt.com/torrent/*
// @grant GM_addStyle
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.3/jquery.min.js
// @run-at document-start
// ==/UserScript==
GM_addStyle('#abcffddafae, .list-box .list dl:nth-child(1), .topbar{display: none !important} .midbox .search .searchBox .kwd input {margin-top:0 !important;font-size:20px !important;padding-left:1% !important}');
function main() {
if (document.domain == 'storebt.com') {
window.location.href = $('.down a').attr('href');
window.setInterval(window.close, 3000);
}
else {
$('#kwd').focus();
var sort = $('.search-option a:nth-last-child(3)');
if (sort.length > 0 && sort.attr('class') != 'active') {
window.location.href = sort.attr('href');
}
$('.detail a').eq(0).each(function(){
window.location.href = $(this).attr('href');
});
}
}
window.setTimeout(main, 1000);