icson.zhougmail.com / duokanyuedu

// ==UserScript==
// @name        duokanyuedu
// @namespace   cn.dietcare
// @include     http://www.duokan.com/reader/*
// @version     1
// @grant       none
// ==/UserScript==
window.loop = 0;
window.page = 1;
window.el = '' ;


window.printContent=function(z)
{
	document.body.innerHTML = z ;
	window.print();
}


window.getEl = function(){
	if(window.loop<=1){
		setTimeout(printContent(el),10000) ;
	}else {
		document.getElementsByClassName('u-icn-next1 j-pagedown')[0].click();
		window.setTimeout(getDoc,3000);
		window.loop = window.loop-1;
	}

}

window.getDoc = function(){
	if(document.getElementById('book_page_'+page)!==null){
		window.el=window.el+'<div>'+document.getElementById('book_page_'+page).innerHTML;
		window.page += 1;
		window.el=window.el + document.getElementById('book_page_'+page)+'</div>';
	}

window.setTimeout(getEl,3000);

}

window.beginParam = function(x) {
	window.loop = x;
//	document.getElementById('tools-bar').style.display="none";
window.getDoc();
}

window.begin = function() {
	window.loop = 9999
	document.getElementById('tools-bar').style.display="none";
	window.getDoc();
}