-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomicpreloader.user.js
More file actions
39 lines (32 loc) · 1.01 KB
/
comicpreloader.user.js
File metadata and controls
39 lines (32 loc) · 1.01 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
// ==UserScript==
// @name MangaPanda auto loader
// @namespace http://www.geeksphere.com
// @description MangaPanda auto loader
// @include http://www.mangapanda.com/*
// @grant none
// ==/UserScript==
var showOnSamePage = false;
window.setTimeout(function(){
$(function(){
$('[id^="ad"]').remove();
var finished = false;
var content = $("body").html();
getNext(content);
function getNext(r){
if (finished) return;
var imgElem = $(r).find('#img');
if (imgElem.length == 0) {
finished = true;
return;
}
var link = imgElem.parent();
var nextImg = imgElem.attr('src');
if (nextImg != $('body').find("#img").attr('src')) {
var fade = (showOnSamePage) ? 'In' : 'Out';
$('#imgholder').append('<img src="'+nextImg+'" style="display:none; margin-top:10px;" onload="$(this).fade'+fade+'();" class="newImages" />');
}
var newImg = imgElem.parent().attr('href');
$.get(link.attr('href'),getNext);
}
});
},500);