-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuni-giga-share@scriptish.user.js
More file actions
60 lines (57 loc) · 2.83 KB
/
uni-giga-share@scriptish.user.js
File metadata and controls
60 lines (57 loc) · 2.83 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// ==UserScript==
// @id f918bae9-3473-4c12-85de-630d840499f0@scriptish
// @name unigigashare
// @version 1.3.2
// @history 1.3.2 Фикс iframe remove
// @history 1.3 Фикс бесплатного скачивания
// @history 1.2.1 includes and updateurl
// @history 1.2 fixed: crazy reload on gigabase. Изменено: jquery библиотека, связано со взломом сайта jquery
// @history 1.1 Добавлено: Определение отсутствующего файла и переход на страницу бесплатного скачиваниния.
// @history 1.0 Релиз
// @namespace https://openuserjs.org/scripts/Black_Sun/unigigashare
// @author Black_Sun
// @description Скрипт выводит ссылку на скачивание в верху страницы. Есть настройка автоскачивания (включена по умолчанию), для выключения см. код скрипта.
// @Download https://openuserjs.org/install/Black_Sun/unigigashare.user.js
// @updateURL https://openuserjs.org/install/Black_Sun/unigigashare.user.js
// @include http://www.share4web.com/get*
// @include http://www.unibytes.com/*
// @include http://www.gigabase.com/get*
// @require https://raw.githubusercontent.com/Black-Sunlight/lib-files/master/jquery.js
// @run-at document-end
// ==/UserScript==
var autodownload=false; //Для выключения автоскачивания написать false вместо true; и соответственно наоборот для включения.
(function(){
var loca=location.host
$('body').prepend('<div id="lnk" style="margin:0 auto;display:block;color:green;font-size:28px;padding:30px;width:100%;background:#D5E7FD;text-align:center">Грузим ссылку</div>');
switch (loca){
case "www.unibytes.com":
getlnk("fdload")
break;
case "www.gigabase.com":
getlnk("dfile")
break;
case "www.share4web.com":
getlnk("getf")
break;
}
})()
function getlnk(ident){
if($('.nothx1').text().search('спасибо')!=-1){var lnk1=$('.nothx1').attr('href');}else{$('#lnk').html('Ошибка, ссылка не найдена!')}
var exist=$('body').find('h3').text()
$('iframe').each(function(){$(this).remove()})
if(exist.indexOf('не существует')==-1){
if(typeof(lnk1)=="undefined") {
location.href=$('body').find('a[href*="/free?"]').attr('href')
}
else {
$.get(lnk1,function(tel){
var lnkfinal=$('a[href*="/'+ident+'/"]',tel)
$('#lnk').html(lnkfinal)
if(autodownload)location.href=$('a[href*="/'+ident+'/"]',tel).attr('href');
})
}
}
else {
$('#lnk').html('Файл не существует, скрипт завершил работу!!!')
}
}