/);
var bookBlock = new Array();
bookBlock[0]=rowText[0].match(/(bookinfo.aspx\?ctrlno=\d+\.?\d*)".*?blank">(.*?)<\/a>.*?(.*?)<\/td> | (.*?)<\/td> | (.*?)<\/td>/);
bookBlock[0].shift();
var list = new LibMeta("GDUT");////构造函数
list.state="booklist";
list.items= new Array();
for(s=0;s.*?<\/tbody>/);
row[0].replace(/ /g,"");
row = row[0].match(/.*?<\/tr>/g);
var storeBlock = new Array();
for(s=0;s(.*?)<\/a><\/td>(.*?)<\/td> | (.*?)<\/td>.*?tbr.*? | .*? | (.*?)<\/td>/);
storeBlock[s].shift();
}
var storeList = new LibMeta("GDUT");
storeList.state="store";
storeList.items= new Array();
for(s=0;s(.*?)<\/a>/)[1];
}
if(!eBook&&str.indexOf("索书")==-1){
var msg = new LibMeta("GDUFS");
msg.state="recommend";
messageCatcher(msg,frameLocation);
return;
}
str = str.match(/全部馆藏(.*?)所有单册/g)
var txt = str[0];
txt = txt.match(/http:.*?sub_library=/);
where=txt;
GM_xmlhttpRequest({ //获取列表
method : 'GET',
synchronous : false,
url : where[0],
onload : function (reDetails) {
if (reDetails.status !== 200&&reDetails.status !== 304){
var msg = new LibMeta("GDUFS");
msg.state="error";
msg.errorMsg="无法获取馆藏列表";
//alert("ISBN连接错误");//后续版本再处理
messageCatcher(msg,frameLocation);
return;
}
var libra =document.createElement("div");
libra.innerHTML = reDetails.responseText;
isbnFilter.GDUFS.getBookinfo(libra.innerHTML,eBook,frameLocation,where[0]);//回调函数馆藏位置获取
}
});
},
/////////////////回调函数馆藏位置获取////////////////////////////////////////
getBookinfo:function(webText,eBook,frameLocation,finalUrl){
var hasBook = true;
webText = webText.replace(/[ | ]*\n/g,'').replace(/\n[\s| | ]*\r/g,'').replace(/amp;/g,"");
///防止无书籍的情况发生
if(webText.indexOf('无匹配单册')!=-1){
var msg = new LibMeta("GDUFS");
msg.state="recommend";
messageCatcher(msg,frameLocation);
}
else{
blockBook = webText.match(/OPAC注释(.*?)<\/tbody>/)[1];
//alert(typeof blockBook);
borrowItem = blockBook.match(/.*?<\/tr>/g);
//alert(borrowItem[0]);
var loan = new Array();
for(k=0;k(.*?)<\/td>.*?date.*?td1">(.*?)<\/td>.*?hour.*?td1>(.*?)<\/td>.*?Sub.*?nowrap="">(.*?)<\/td>.*?Location.*?td1">(.*?)<\/td>/);
/////借书类型/时间/到期/位置/索书号
}
}
/////////////////
if(hasBook){
//alert("hasBook");
var storeList = new LibMeta("GDUFS");
storeList.state="store";
storeList.items= new Array();
for(s=0;s/,"");
storeList.items[s].branch=loan[s][4];
storeList.items[s].bookIndex=loan[s][5];
storeList.items[s].link=finalUrl;
if(storeList.items[s].storeState.indexOf('外借')!=-1&&storeList.items[s].returnTime.indexOf('在架上')!=-1&&storeList.items[s].storeState.indexOf('闭架')==-1){//闭架无法预约
storeList.items[s].rentable=true;
}
}
if(eBook){
var itemsLength=storeList.items.length;
storeList.items[itemsLength]=new StoreItem("GDUFS");
storeList.items[itemsLength].link=eBook;
storeList.items[itemsLength].type="eBook";
storeList.items[itemsLength].storeState="电子书";
};
}
messageCatcher(storeList,frameLocation);
//////////////////////完成框架插入//////////////
}
},
//广州中医药大学
GZHTCM:{
respond:function (reDetails,frameLocation) {
if (reDetails.status !== 200&&reDetails.status !== 304){
var msg = new LibMeta("GZHTCM");
msg.state="error";
msg.errorMsg="ISBN连接错误";
messageCatcher(msg,frameLocation);
return;
}
if(reDetails.responseText.indexOf('没有')!=-1){
var msg = new LibMeta("GZHTCM");
msg.state="recommend";
messageCatcher(msg,frameLocation);
return;
}
isbnFilter.GZHTCM.filter(reDetails.responseText,frameLocation);
},
filter:function(text,frameLocation){
text = text.replace(/[ | ]*\n/g,'').replace(/\n[\s| | ]*\r/g,'').replace(/amp;/g,"").replace(/ /g,"").replace(/\r/g,"");
rowText = text.match(/book_list_info.*? (.*?)<\/a>(.*?)<\/h3>.*?span>(.*?) (.*?)<\/span>(.*?) (.*?) /);
bookBlock[s].shift();
}
var list = new LibMeta("GZHTCM");////构造函数
list.state="booklist";
list.items= new Array();
for(s=0;s(.*?)<\/td>.*?gif"\/>(.*?)<\/td>.*?20%">(.*?)<\/td>/);
storeBlock[s].shift();
}
var storeList = new LibMeta("GZHTCM");
storeList.state="store";
storeList.items= new Array();
for(s=0;s.*?<\/div>/g);
var bookBlock = new Array();
var bookDetail = new Array();
for(s=0;s(.*?)<\/a>(.*?)<\/span>.*?(.*?) /);
bookBlock[s].shift();
}
var list = new LibMeta("GZHU");////构造函数
list.state="booklist";
list.items= new Array();
for(s=0;s(.*?)<\/td>/)[1];
text=text.match(/holdings_info_content.*?clear/);
row = text[0].match(/.*?<\/tr>/g);
var storeBlock= new Array();
for(s=0;s(.*?)<\/td>(.*?)<\/td> | (.*?)<\/td> | (.*?)<\/td> | (.*?)/);
storeBlock[s].shift();
}
var storeList = new LibMeta("GZHU");
storeList.state="store";
storeList.items= new Array();
for(s=0;s/);
var bookBlock = new Array();
bookBlock[0]=rowText[0].match(/(bookinfo.aspx\?ctrlno=\d+\.?\d*)".*?blank">(.*?)<\/a>.*?(.*?)<\/td> | (.*?)<\/td> | (.*?)<\/td>/);
//alert(bookBlock[0].length);
bookBlock[0].shift();
var list = new LibMeta("GZARTS");////构造函数
list.state="booklist";
list.items= new Array();
for(s=0;s.*?<\/tbody>/);
row[0].replace(/ /g,"");
row = row[0].match(/.*?<\/tr>/g);
var storeBlock = new Array();
for(s=0;s(.*?)<\/a><\/td>(.*?)<\/td> | (.*?)<\/td>.*?tbr.*? | .*? | (.*?)<\/td>/);
storeBlock[s].shift();
}
var storeList = new LibMeta("GZARTS");
storeList.state="store";
storeList.items= new Array();
for(s=0;s/);
var bookBlock = new Array();
bookBlock[0]=rowText[0].match(/(bookinfo.aspx\?ctrlno=\d+\.?\d*)".*?blank">(.*?)<\/a>.*?(.*?)<\/td> | (.*?)<\/td> | (.*?)<\/td>/);
//alert(bookBlock[0].length);
bookBlock[0].shift();
var list = new LibMeta("XHCOM");////构造函数
list.state="booklist";
list.items= new Array();
for(s=0;s.*?<\/tbody>/);
row[0].replace(/ /g,"");
//alert(row[0]);
row = row[0].match(/.*?<\/tr>/g);
var storeBlock = new Array();
for(s=0;s(.*?)<\/a><\/td>(.*?)<\/td> | (.*?)<\/td>.*?tbr.*? | .*? | (.*?)<\/td>/);
storeBlock[s].shift();
}
var storeList = new LibMeta("XHCOM");
storeList.state="store";
storeList.items= new Array();
for(s=0;s.*?<\/table>/g);
///////获取图书馆书本元信息//////
var bookDetail = new Array();//元信息数组
atxt.shift();//去除整块信息中的多余信息
for(s=0;s(.*?)<\/a>.*?top>(.*?)(.*?).*?top>(.*?)(.*?)/).slice(1);
// 超链接/ 书名 /作者 / 索引号/出版社 /年份 /
}
////////框架//////////////////////////////////
//判断URL类型
if(urltext.indexOf('ISB')!=-1){
var allBook = '中大ISBN检索' +
' 前往图书馆查看这本书';
}
else{
var allBook = ' 中大图书馆检索' +
' 前往图书馆查看这本书';
}
var display;
var list = new LibMeta("SYSU");////构造函数
list.state="booklist";
list.items= new Array();
for(s=0;s 4){
display=" ;display : none";
}
else{
display="";
}
list.items[s] = new LibItem("SYSU");
list.items[s].link = bookDetail[s][0];
list.items[s].bookName = bookDetail[s][1];
list.items[s].author = bookDetail[s][2];
list.items[s].publisher = bookDetail[s][4];
list.items[s].pubDate = bookDetail[s][5];
}
messageCatcher(list,frameLocation);
//判断URL
///////////////判断URL
//}
////////////插入框架结束//////////////
}
},
//华南理工大学
SCUT:{
respond:function (reDetails,frameLocation) {
if (reDetails.status !== 200&&reDetails.status !== 304){
var msg = new LibMeta("SCUT");
msg.state="error";
msg.errorMsg="全字段连接错误";
messageCatcher(msg,frameLocation);
return;
}
if(reDetails.responseText.indexOf('无符合')!=-1){
var msg = new LibMeta("SCUT");
msg.state="error";
msg.errorMsg="全字段查无此书";
messageCatcher(msg,frameLocation);
return;
}
titleFilter.SCUT.filter(reDetails.responseText,frameLocation);
},
filter:function(text,frameLocation){
text = text.replace(/[ | ]*\n/g,'').replace(/\n[\s| | ]*\r/g,'').replace(/amp;/g,"");
rowText = text.match(/javascript:book_detail.*?<\/tr>/g);
var bookBlock = new Array();
var bookDetail = new Array();
for(s=0;s(.*?)<\/a>.*?F">(.*?)<\/TD>.*?F">(.*?)<\/TD>.*?F">(.*?)<\/TD>.*?F">(.*?)<\/TD>.*?F">(.*?)<\/TD>.*?F">(.*?)<\/TD>/);
bookBlock[s].shift();
}
var list = new LibMeta("SCUT");////构造函数
list.state="booklist";
list.items= new Array();
for(s=0;s(.*?)<\/a>(.*?)<\/h3>.*?span>(.*?) (.*?)<\/span>(.*?) (.*?) /);
bookBlock[s].shift();
}
var list = new LibMeta('SCNU'); ////构造函数
list.state = 'booklist';
list.items = new Array();
for (s = 0; s < rowText.length; s++) {
list.items[s] = new LibItem('SCNU');
list.items[s].link = 'http://202.116.41.246:8080/opac/item.php?marc_no=' + bookBlock[s][0];
list.items[s].bookName = bookBlock[s][1];
list.items[s].author = bookBlock[s][5];
list.items[s].publisher = bookBlock[s][6];
list.items[s].bookIndex = bookBlock[s][2];
}
messageCatcher(list,frameLocation);
return;
}
},
//广东工业大学
GDUT:{
respond:function (reDetails,frameLocation) {
if (reDetails.status !== 200&&reDetails.status !== 304){
var msg = new LibMeta("GDUT");
msg.state="error";
msg.errorMsg="全字段连接错误";
messageCatcher(msg,frameLocation);
return;
}
if(reDetails.responseText.indexOf('没有')!=-1){
//alert("ISBN查无此书"); //增加荐购
var msg = new LibMeta("GDUT");
msg.state="error";
msg.errorMsg="全字段查无此书";
messageCatcher(msg,frameLocation);
return;
}
//document.getElementById("reviews").textContent=reDetails.responseText;
titleFilter.GDUT.filter(reDetails.responseText,frameLocation);
},
filter:function(text,frameLocation){
text = text.replace(/[ | ]*\n/g,'').replace(/\n[\s| | ]*\r/g,'').replace(/amp;/g,"").replace(/\r/g,"").replace(/ /g,"");
rowText = text.match(/(bookinfo.aspx\?ctrlno=\d+\.?\d*)".*?blank">(.*?)<\/a>.*?(.*?)<\/td> | (.*?)<\/td> | (.*?)<\/td>/g);
var bookBlock = new Array();
for(s=0;s(.*?)<\/a>.*?(.*?)<\/td> | (.*?)<\/td> | (.*?)<\/td>/);
bookBlock[s].shift();
}
bookBlock[0].shift();
var list = new LibMeta("GDUT");////构造函数
list.state="booklist";
list.items= new Array();
for(s=0;s.*?<\/table>/g);
///////获取图书馆书本元信息//////
var bookDetail = new Array();//元信息数组
atxt.shift();//去除整块信息中的多余信息
for(s=0;s(.*?)<\/a>.*?top>(.*?)(.*?).*?top>(.*?)(.*?)/).slice(1);
// 超链接/ 书名 /作者 / 索引号/出版社 /年份 /
}
////////框架//////////////////////////////////
var display;
var list = new LibMeta("GDUFS");////构造函数
list.state="booklist";
list.items= new Array();
for(s=0;s4){
display=" ;display : none";
}
else{
display="";
}
list.items[s] = new LibItem("GDUFS");
list.items[s].link = bookDetail[s][0];
list.items[s].bookName = bookDetail[s][1];
list.items[s].author = bookDetail[s][2].replace(/ /,"").replace(/ /,"");
list.items[s].publisher = bookDetail[s][4];
list.items[s].pubDate = bookDetail[s][5];
}
messageCatcher(list,frameLocation);
//判断URL
///////////////判断URL
//}
////////////插入框架结束//////////////
}
},
//广州中医药大学
GZHTCM:{
respond:function (reDetails,frameLocation) {
if (reDetails.status !== 200&&reDetails.status !== 304){
var msg = new LibMeta("GZHTCM");
msg.state="error";
msg.errorMsg="全字段连接错误";
messageCatcher(msg,frameLocation);
return;
}
if(reDetails.responseText.indexOf('没有')!=-1){
//alert("ISBN查无此书"); //增加荐购
var msg = new LibMeta("GZHTCM");
msg.state="error";
msg.errorMsg="全字段查无此书";
messageCatcher(msg,frameLocation);
return;
}
titleFilter.GZHTCM.filter(reDetails.responseText,frameLocation);
},
filter:function(text,frameLocation){
text = text.replace(/[ | ]*\n/g,'').replace(/\n[\s| | ]*\r/g,'').replace(/amp;/g,"").replace(/ /g,"").replace(/\r/g,"");
rowText = text.match(/book_list_info.*? (.*?)<\/a>(.*?)<\/h3>.*?span>(.*?) (.*?)<\/span>(.*?) (.*?) /);
bookBlock[s].shift();
}
var list = new LibMeta("GZHTCM");////构造函数
list.state="booklist";
list.items= new Array();
for(s=0;s.*?<\/div>/g);
var bookBlock = new Array();
var bookDetail = new Array();
for (s = 0; s < rowText.length; s++) {
bookBlock[s] = rowText[s].match(/href="(.*?)"target="_blank">(.*?)<\/a>(.*?)<\/span>.*?(.*?) /);
bookBlock[s].shift();
}
var list = new LibMeta('GZHU'); ////构造函数
list.state = 'booklist';
list.items = new Array();
for (s = 0; s < rowText.length; s++) {
list.items[s] = new LibItem('GZHU');
list.items[s].link = 'http://lib.gzhu.edu.cn:8080' + bookBlock[s][0];
list.items[s].bookName = bookBlock[s][1];
list.items[s].author = bookBlock[s][2];
list.items[s].publisher = bookBlock[s][3];
}
messageCatcher(list,frameLocation);
return;
}
},
//广州美术学院
GZARTS:{
respond:function (reDetails,frameLocation) {
if (reDetails.status !== 200&&reDetails.status !== 304){
var msg = new LibMeta("GZARTS");
msg.state="error";
msg.errorMsg="全字段连接错误";
//alert("ISBN连接错误");
messageCatcher(msg,frameLocation);
return;
}
if(reDetails.responseText.indexOf('没有')!=-1){
var msg = new LibMeta("GZARTS");
msg.state="error";
msg.errorMsg="全字段查无此书";
messageCatcher(msg,frameLocation);
return;
}
titleFilter.GZARTS.filter(reDetails.responseText,frameLocation);
},
filter:function(text,frameLocation){
text = text.replace(/[ | ]*\n/g,'').replace(/\n[\s| | ]*\r/g,'').replace(/amp;/g,"").replace(/\r/g,"").replace(/ /g,"");
rowText = text.match(/(bookinfo.aspx\?ctrlno=\d+\.?\d*)".*?blank">(.*?)<\/a>.*?(.*?)<\/td> | (.*?)<\/td> | (.*?)<\/td>/g);
var bookBlock = new Array();
for(s=0;s(.*?)<\/a>.*?(.*?)<\/td> | (.*?)<\/td> | (.*?)<\/td>/);
bookBlock[s].shift();
}
bookBlock[0].shift();
var list = new LibMeta("GZARTS");////构造函数
list.state="booklist";
list.items= new Array();
for(s=0;s(.*?)<\/a>.*?(.*?)<\/td> | (.*?)<\/td> | (.*?)<\/td>/g)
var bookBlock = new Array();
for(s=0;s(.*?)<\/a>.*?(.*?)<\/td> | (.*?)<\/td> | (.*?)<\/td>/);
bookBlock[s].shift();
}
var list = new LibMeta("XHCOM");////构造函数
list.state="booklist";
list.items= new Array();
for(s=0;s(.*?)<\/a>.*?作者:(.*?)<\/li>.*?出处:(.*?) /);
if(bookBlock[s]==null){
bookBlock[s]=bookBlock[s-1];
continue;
}
bookBlock[s].shift();
//链接|书名|作者|出处
getInfo = rowText[s].match(/获得途径:<\/span>(.*?)<\/li>/);
if(getInfo){
getInfo[1] = getInfo[1].replace(/href="/g,'href="http://ss.zhizhen.com').replace(/href=\//g,'href=http://ss.zhizhen.com/');
bookBlock[s][4] = getInfo[1];
//
}
else{
bookBlock[s][4]="无获取途径";
}
}
var list = new LibMeta("zhizhen");////构造函数
list.state="zhizhen";
list.items= new Array();
for(s=0;s/g);
var bookBlock = new Array();
for(s=0;s(.*?)<\/span>/);
bookBlock[s].shift();
//|书名|链接|作者
}
var list = new LibMeta("chaoxing");////构造函数
list.state="chaoxing";
list.items= new Array();
for(s=0;s'+schoolInfo[prefs.school].abbrName+''+
''+otherTabName+''+
''+'谷歌聚合搜索'+''+
''+
' '+' '+schoolInfo[prefs.school].abbrName+'图书馆全字段检索'+''+
''+
''+' '+
' 努力加载中...'+
' ';
frame.setAttribute("class","tablist title_div");
if(location.href.indexOf("ebook")!=-1){
var aside=document.getElementsByTagName("aside")[0];
}
else{
var aside=document.querySelector(".aside");
}
aside.insertBefore(frame,aside.firstChild.nextSibling);
clickOther=document.getElementById("clickOtherTitle");
clickOther.addEventListener("click",showOtherFrame,false);
clickOther=document.getElementById("clickTitle");
clickOther.addEventListener("click",showOriginFrame,false);
clickOther=document.getElementById("clickJaysonTitle");
clickOther.addEventListener("click",showJaysonFrame,false);
}
ISBNFrame=function(){
function showOtherFrame(){
document.getElementById("libISBN").style.display="none";
document.getElementById("otherISBN").style.display="block";
defineClass=this.getAttribute("data-ready");
this.setAttribute("class","blue");
document.getElementById("clickISBN").setAttribute("class","");
if(!defineClass){
this.setAttribute("data-ready","already");
otherISBN();
}
}
function showOriginFrame(){
document.getElementById("libISBN").style.display="block";
document.getElementById("otherISBN").style.display="none";
this.setAttribute("class","blue");
document.getElementById("clickOtherISBN").setAttribute("class","");
}
var frame = document.createElement("div");
var NLCfinalUrl = schoolInfo.NLC.isbnSearchUrl.replace(/%s/,bookMeta.isbn10);
var CALISfinalUrl = schoolInfo.CALIS.isbnSearchUrl.replace(/%s/,bookMeta.isbn10);
frame.innerHTML= ''+
''+' '+schoolInfo[prefs.school].abbrName+'图书馆ISBN检索'+''+
''+
' 前往CALIS'+' '+' 前往国家图书馆'+
' ';//+
frame.setAttribute("class","tablist");
if(location.href.indexOf("ebook")!=-1){
var aside=document.getElementsByTagName("aside")[0];
}
else{
var aside=document.querySelector(".aside");
}
aside.insertBefore(frame,aside.firstChild);
clickOther=document.getElementById("clickOtherISBN");
clickOther.addEventListener("click",showOtherFrame,false);
clickOther=document.getElementById("clickISBN");
clickOther.addEventListener("click",showOriginFrame,false);
document.getElementById("settingPop").addEventListener("click",popSetting,false);
}
//////////////////////其它图书馆ISBN//////////////////////////////////
function otherISBN(){
for(var key in schoolList){
if(schoolList[key]!=prefs.school){
//alert(school);
mineISBN(schoolList[key],"otherISBN");
}
}
}
//////////////////////超星其它//////////////////////////////////
function otherTitle(){
//////////////////////////超星发现和超星读书
if(bookMeta.lan=="en"){
var fullUrl=schoolInfo.EBSCO.anySearchUrl.replace(/%s/,bookMeta.title);//外文图书
}
else{
var fullUrl=schoolInfo.zhizhen.anySearchUrl.replace(/%s/,bookMeta.title);
var fullUrl2=schoolInfo.chaoxing.anySearchUrl.replace(/%s/,bookMeta.title);
}
var frame=document.getElementById("mainOtherTitle");
var loadingFrame=document.createElement("div");
loadingFrame.setAttribute("id","otherTitleLoading");
loadingFrame.innerHTML= ' 努力加载中...'
var frameLink = document.createElement("a");
frameLink.setAttribute("target","_blank");
frameLink.innerHTML="前往查看检索";
frameLink.setAttribute("href",fullUrl);
frame.appendChild(frameLink);
frame.appendChild(loadingFrame);
if(bookMeta.lan=="zh"){
GM_xmlhttpRequest({ //获取列表
method : 'GET',
synchronous : false,//异步获取
url : fullUrl,
onload :function (reDetails){
titleFilter.zhizhen.respond(reDetails,"otherTitle",fullUrl);
}
});
//////////////////////
GM_xmlhttpRequest({ //获取列表
method : 'GET',
synchronous : false,//异步获取
url : fullUrl2,
onload :function (reDetails){
titleFilter.chaoxing.respond(reDetails,"otherTitle",fullUrl2);
}
});
}
else{
GM_xmlhttpRequest({ //获取列表
method : 'GET',
synchronous : false,//异步获取
url : fullUrl,
onload :function (reDetails){
titleFilter.EBSCO.respond(reDetails,"otherTitle",fullUrl);
}
});
}
}
//////////////////谷歌检索,改自豆藤////////////////////////////
var jaysonTitle = function(){
var keyw = bookMeta.title;
var cid = '006100883259189159113%3Atwgohm0sz8q'
//http://g.yon.hk/uds/GwebSearch?rsz=filtered_cse&hl=zh_CN&cx=006100883259189159113%3Atwgohm0sz8q&v=1.0&key=notsupplied&q=allintitle%3Aboy
var getSite = function(){
return [
//'https://gs.awei.me/'//'http://g.yh.gs/'
//,'https://www.ppx.pw/'
'http://www.guge.link/'
//,'https://www.ko50.com/'
,'https://www.guge.click/'
//,'http://gg.cellmean.com/'
,'https://google.xface.me/'
,'http://google.sidney-aldebaran.me/'
//,'https://guge.in/'
//,'http://www.ggooo.net/'
,'https://gg.kfd.me/'
//,'https://www.ko50.com/'
//,'https://google-hk.wewell.net/'
//,'http://www.googlestable.cn/'
//,'http://hisbig.com/'
//,'http://gg.cellmean.com/'
,'https://www.sslpxy.com/'
,'http://xueshu.cytbj.com/'
//,'https://www.nssjs.com/'
//,'https://hk.g.net.co/'
][Math.floor(Math.random() * 7 + 1)-1];
// ******** Google 镜像 ********
};
var googleLoader = function(site){
var path = site || 'http://www.google.com/';
// var path = 'https://repigu.com/';
GM_xmlhttpRequest({
method: 'GET',
headers: {
"User-Agent": "Mozilla/5.0", // If not specified, navigator.userAgent will be used.
"Accept": "text/html;charset=utf-8" // If not specified, browser defaults will be used.
},
url: path + 'uds/GwebSearch?rsz=filtered_cse&hl=zh_CN&cx='+cid+'&v=1.0&key=notsupplied&q=allintitle%3A' + keyw,
onload: function(resp){
//alert(resp.status);
if(resp.status < 200 || resp.status > 300){
googleLoader(getSite()); // 切换镜像
return;
};
if(resp.responseText.indexOf('Abuse')!==-1){
//alert("Abuse");
googleLoader(getSite()); // 切换镜像
return;
}
var date = JSON.parse(resp.responseText);
var loading =document.getElementById("googleLoading");
if(loading) loading.parentNode.removeChild(loading);
var itemNum = date.responseData.results.length; //搜索结果条目数
if(itemNum == 0){
document.getElementById("jaysonTitle").innerHTML+='未找到相关内容 ';
};
for(var i=0,j=itemNum; i'+ webSite +'' + itemi.title.replace(/_免费高速下载_新浪爱问共享资料|-epub电子书下载.*|–华为网盘.*|-在线下载.*|网盘下载\|115网盘.*|迅雷快传-|\| IMAX\.im 高清影院|资源下载,中文字幕下载,|电影,|下载,|已上映,|,下载《.*|\| 720p 高清电影\(imax.im\)|[\[【\((][^\[\]]*\.(com|cn|net|org|cc)[\]】\))]/gi, '') + '';
};
},
onerror: function(){
googleLoader(getSite());
return;
}
});
};
googleLoader(getSite());
};
//////////////ISBN搜索xml获取//////////////////
mineISBN = function(school,frameLocation){
if(frameLocation=="ISBN"){
ISBNFrame();
}
if(bookMeta.isbn){
var fullUrl="";
switch(school){
case "SCUT":
case "SCNU":
case "GZHU":
case "GDUT":
case "GZHTCM":
case "GZARTS":
case "XHCOM":
fullUrl =schoolInfo[school].isbnSearchUrl.replace(/%s/,bookMeta.isbn10);
break;
case "SYSU":
case "GDUFS":
if(bookMeta.isbn&&bookMeta.title.charCodeAt(0)<=122&&bookMeta.isbn[3]!=="7"){
fullUrl=schoolInfo[school].isbnForeianSearchUrl.replace(/%s/,bookMeta.isbn);
}
else{
fullUrl=schoolInfo[school].isbnSearchUrl.replace(/%s/,bookMeta.isbn);
}
break;
default:
break;
}
if(frameLocation=="ISBN"){
insertLoading(fullUrl);
}
frame = document.getElementById("libISBN"); //此处frame需要删除
GM_xmlhttpRequest({ //获取列表
method : 'GET',
synchronous : false,//异步获取
url : fullUrl,
onload :function (reDetails){
isbnFilter[school].respond(reDetails,frameLocation,fullUrl);
}
});
}
else{//无ISBN号的情况
var msg = new LibMeta(school);
msg.error=true;
msg.state="error";
msg.errorMsg = "无法获取ISBN号";
messageCatcher(msg,frameLocation)
}
}
function insertLoading(fullUrl){
frame = document.getElementById("libISBN");
frameLink = document.createElement("a");
frameLink.setAttribute("target","_blank");
frameLink.innerHTML="前往图书馆查看这本书";
frameLink.setAttribute("href",fullUrl);
frame.appendChild(frameLink);
loadingFrame=document.createElement("div");
loadingFrame.setAttribute("id","ISBNLoading");
loadingFrame.innerHTML= ' 努力加载中...'
frame.appendChild(loadingFrame);
}
/////////////////////////////////////////
//////////////书名搜索xml获取//////////////////
mineTitle = function(school){
titleFrame();
if(bookMeta.isbn&&bookMeta.title.charCodeAt(0)<=122&&bookMeta.isbn[3]!=="7"){
var fullUrl=schoolInfo[school].anyForeianSearchUrl.replace(/%s/,bookMeta.title);
GM_setValue("doubanLanguage","en");
}
else{
var fullUrl=schoolInfo[school].anySearchUrl.replace(/%s/,bookMeta.title);
}
frame = document.getElementById("libTitle");
var loadingFrame=document.createElement("div");
loadingFrame.setAttribute("id","titleLoading");
loadingFrame.innerHTML= ' 努力加载中...'
var frameLink = document.createElement("a");
frameLink.setAttribute("target","_blank");
frameLink.innerHTML="前往图书馆查看这本书";
frameLink.setAttribute("href",fullUrl);
frame.appendChild(frameLink);
frame.appendChild(loadingFrame);
if(!schoolInfo[school].isGBK){
GM_xmlhttpRequest({ //获取列表
method : 'GET',
synchronous : false,//异步获取
url : fullUrl,
onload :function (reDetails){
titleFilter[school].respond(reDetails,"title",fullUrl);
}
});
}
else{
GM_xmlhttpRequest({
method: 'GET',
url: 'http://www.baidu.com/s?ie=utf-8&wd=' + encodeURIComponent(bookMeta.title),
overrideMimeType: 'text/xml; charset=gb2312',
onload: function(response) {
//alert("text");
if (response.status !== 200&&response.status !== 304){
var msg = new LibMeta(school);
msg.state="error";
msg.errorMsg="无法获取远程GBK转码";
messageCatcher(msg,frameLocation);
return;
}
var keywordGB = String(response.responseText.match(/word=[^'"&]+['"&]/i)).replace(/word=|['"&]/ig,'');
fullUrl= schoolInfo[school].anySearchUrl.replace(/%s/,keywordGB);
frameLink.setAttribute("href",fullUrl);
//alert(fullUrl);
GM_xmlhttpRequest({ //获取列表
method : 'GET',
synchronous : false,//异步获取
url : fullUrl,
onload :function (reDetails){
titleFilter[school].respond(reDetails,"title",fullUrl);
}
});
},
onerror: function(){
return;
}
});
}
}
/////////////////////////////////////////
///////////////ISBN插入框架//////////////////////////////
ISBNInsert=function(msg,frameLocation){
var innerContent=document.createElement("div");
innerContent.innerHTML= msg;
switch(frameLocation){
case "ISBN":
loading =document.getElementById("ISBNLoading");
loading.parentNode.removeChild(loading);
frame = document.getElementById("libISBN");
break;
case "title":
loading =document.getElementById("titleLoading");
loading.parentNode.removeChild(loading);
frame = document.getElementById("libTitle");
break;
case "otherISBN":
frame = document.getElementById("mainOtherISBN");
break;
default:
break;
}
frame.appendChild(innerContent);
function addStoreListener(){
GM_setClipboard(this.getAttribute("data-storeInfo"));
noteInfo = "已复制到粘贴板 "+this.getAttribute("data-storeInfo");
// Let's check if the browser supports notifications
if (!("Notification" in window)) {
confirm("以下信息已复制到粘贴板\n\n"+this.getAttribute("data-storeInfo"));
}
// Let's check if the user is okay to get some notification
else if (Notification.permission === "granted") {
// If it's okay let's create a notification
var notification = new Notification(noteInfo);
}
// Otherwise, we need to ask the user for permission
// Note, Chrome does not implement the permission static property
// So we have to check for NOT 'denied' instead of 'default'
else if (Notification.permission !== 'denied') {
Notification.requestPermission(function (permission) {
// Whatever the user answers, we make sure we store the information
if (!('permission' in Notification)) {
Notification.permission = permission;
}
// If the user is okay, let's create a notification
if (permission === "granted") {
var notification = new Notification(noteInfo);
}
else{
confirm("以下信息已复制到粘贴板\n\n"+this.getAttribute("data-storeInfo"));
}
});
}
else{
confirm("以下信息已复制到粘贴板\n\n"+this.getAttribute("data-storeInfo"));
}
}
var storeListener = document.querySelectorAll(".preStoreRegister");
for(s=0;s荐购' );
var allBook = '';
innerContent.innerHTML= allBook;
frame.appendChild(innerContent);
button=document.getElementById("recbtn");
if(button){
button.addEventListener("click",gotoRecommend,false);
}
}
///////获取回调数据//////////////
messageCatcher=function(msg,frameLocation){
switch(msg.state){
case "store":
var allBook="";
var otherAbbr="";
if(frameLocation.indexOf("other")!=-1){
otherAbbr="院校:"+schoolInfo[msg.school].abbrName+" ";
}
var attachRent="";
for(s=0;s ' +//+'ondblclick="GM_setClipboard(this.getAttribute('+"'data-storeInfo'"+'))"'
''+otherAbbr+'状态:' + msg.items[s].storeState+
' 应还日期: ' + msg.items[s].returnTime +'' +
'分馆: ' + msg.items[s].branch + '' +
'';
allBook += bookStatus;
}
ISBNInsert(allBook,frameLocation);
break;
case "booklist":
var display;
var allBook = "";
var otherAbbr="";
var extra="";
//alert(msg.school);
if(frameLocation.indexOf("other")!=-1){
if(msg.school=="EBSCO"){
otherAbbr=schoolInfo[msg.items[0].school].abbrName+" ";
}
else{
otherAbbr="院校:"+schoolInfo[msg.items[0].school].abbrName+" ";
}
}
for(s=0;s4){
display="display : none;";
}
else{
display="";
}
if(msg.school=="EBSCO"){
extra='Full Text';
}
bookStatus = '';
allBook += bookStatus;
}
titleInsert(allBook,frameLocation);
break;
case "recommend":
recommendBook(frameLocation,msg.school);
break;
case "error":
var bookStatus = ' ' +
'- ' + msg.errorMsg+'
' +
' ';
errorInsert(bookStatus,frameLocation,schoolInfo[msg.school].abbrName);
break;
case "zhizhen"://超星发现
var display;
var allBook = "";
var otherAbbr="";
otherAbbr=schoolInfo[msg.items[0].school].abbrName+" ";
for(s=0;s4){
display="display : none;";
}
else{
display="";
}
bookStatus = ' ' +
'- '+otherAbbr+'书名:'+'' + msg.items[s].bookName+ '
' +
'- 作者: ' + msg.items[s].author +
' 出版社:' + msg.items[s].publisher + '
'+
'- 获取途径:'+msg.items[s].extra+'
' +
' ';
allBook += bookStatus;
}
titleInsert(allBook,frameLocation);
break;
case "chaoxing"://超星读书
var display;
var allBook = "";
var otherAbbr="";
otherAbbr=schoolInfo[msg.items[0].school].abbrName+" ";
for(s=0;s4){
display="display : none;";
}
else{
display="";
}
bookStatus = '';
allBook += bookStatus;
}
titleInsert(allBook,frameLocation);
break;
default:
alert("defalut");
break;
}
}
/////////////////////////////////
GM_addStyle('.recbtn{display: inline-block; background: #33A057;border: 1px solid #2F7B4B; color: white; padding: 1px 10px; border-radius: 3px; margin-right: 8px;cursor:pointer} ')
GM_registerMenuCommand("图书馆检索设置", popSetting);
//////////////主函数//////////////////////////
if(location.href.indexOf('douban')!=-1){
GM_addStyle(".tablist {position:relative;}"+
".tab_content {position: relative;width:295px;margin-bottom:5px;max-height: 300px;overflow: auto;padding:15px 5px 15px 5px;border:1px solid #91a7b4;border-radius:3px;box-shadow:0 2px 3px rgba(0,0,0,0.1);font-size:1.2em;line-height:1.5em;color:#666;background:#F6F6F1;}"+
".tabmenu {position:absolute;bottom:100%;margin:0;width:316px;}"+
".tabmenu li{display:inline-block;}"+
".tabmenu li a {display:block;padding:5px 10px;margin:0 10px 0 0;border:1px solid #91a7b4;border-radius:5px 5px 0 0;background:#F6F6F1;color:#333;text-decoration:none;}#libISBN div ul,#libTitle div ul,#otherISBN div ul,#otherTitle div ul{border-bottom: 1px dashed #ddd;}#errorOtherISBN{font-size:10px}.blue a{background:#37A !important;color:white !important;}.tab_content h2{color:#007722; font:15px/150% Arial,Helvetica,sans-serif;margin: 0 0 12px;}"+
".libTop{margin-top:30px;}#clickISBN a,#clickOtherISBN a,#settingPop a{cursor:pointer;}#settingPop{position:relative;float:right;}"+
".rentable{background:#E3F1ED!important;}.ft.pl.rentable li a{color:#4f946e;}.ft.pl.rentable li a:hover{background:#007711;color:#FFFFFF;}"+
".title_div{margin-top: 35px;}");
mineISBN(prefs.school,"ISBN");
mineTitle(prefs.school);
GM_setValue("doubanTitle",bookMeta.title);
GM_setValue("doubanAuthor",bookMeta.author);
GM_setValue('doubanPubdate',bookMeta.pubdate);
GM_setValue("doubanIsbn",bookMeta.isbn);
GM_setValue("doubanPublisher",bookMeta.publisher);
}
if(location.href.indexOf('http://202.116.64.108:8080/apsm/recommend/recommend.jsp')!=-1){
libRecommend.SYSU();//中山大学图书馆荐购页面
}
if(location.href.indexOf('http://202.38.232.10/opac/servlet/opac.go?cmdACT=recommend.form')!=-1){
libRecommend.SCUT();//华南理工大学图书馆荐购页面
}
if(location.href.indexOf('http://opac.gdufs.edu.cn:8118/apsm/recommend/recommend_nobor.jsp')!=-1){
libRecommend.SYSU();//广东外语外贸大学图书馆荐购页面
}
if(location.href.indexOf('gdtgw.cn')!=-1){//十校互借页面
if(GM_getValue('gotoRent')==true){
function clickShow(mutations){ //点击按钮
function fillForm(mutations){//填写表单
//document.getElementById("publishTime").value=GM_getValue("doubanPubdate","");
/*observerRight.disconnect();//去除监听*/
//var target = document.getElementById("supplier");
var target = document.querySelector('#supplier');
var observerSchool = new MutationObserver(function(mutations,obs){
document.getElementsByName("reader.campusId")[0].value=prefs.school.toLowerCase();
document.getElementById("supplier").value=GM_getValue("rentSchool","");
//alert("test");
obs.disconnect;
observerRight.disconnect();
});
var config = { 'childList': true}
// 传入目标节点和观察选项
observerSchool.observe(target, config);
///
//document.getElementsByName("reader.campus")[0].value=prefs.campus;
document.getElementById("phone").value=prefs.telephone;
document.getElementById("idNo").value=prefs.studentID;
document.getElementById("name").value=prefs.name;
document.getElementById("email").value=prefs.eMail;
document.getElementsByName("reader.campus")[0].value=prefs.campus;
document.getElementById("callNo").value=GM_getValue("bookIndex","");
document.getElementById("title").value=GM_getValue("doubanTitle","");
document.getElementById("isbn").value=GM_getValue("doubanIsbn","");
document.getElementById("publishTime").value=GM_getValue("doubanPubdate","");
document.getElementById("author").value=GM_getValue("doubanAuthor","");
document.getElementById("publisher").value=GM_getValue("doubanPublisher","");
}
////////////////////////////////////////
document.getElementById("Map").areas[1].click();
observerLeft.disconnect();
var target = document.querySelector('#rightContent');
var observerRight = new MutationObserver(fillForm);
var config = { 'childList': true}
// 传入目标节点和观察选项
observerRight.observe(target, config);
}
///////////////////////
var MutationObserver = window.MutationObserver ||
window.WebKitMutationObserver ||
window.MozMutationObserver;
if(MutationObserver){
// 选择目标节点
var target = document.querySelector('#leftContent');
// 创建观察者对象
var observerLeft = new MutationObserver(clickShow);
// 配置观察选项:
var config = { 'childList': true}
// 传入目标节点和观察选项
observerLeft.observe(target, config);
// 随后,你还可以停止观察
}
else{
function clickSecond(){
document.getElementById("idNo").value=prefs.studentID;
document.getElementById("campusId").value=prefs.school.toLowerCase();//无法设置,还需要一次监听,或者setTimeout
document.getElementsByName("reader.email")[0].value=prefs.eMail;
document.getElementsByName("reader.campus")[0].value=prefs.campus;
document.getElementsByName("reader.phone")[0].value=prefs.telephone;
document.getElementById("name").value=prefs.name;
document.getElementById("supplier").value=GM_getValue("rentSchool","");
document.getElementById("callNo").value=GM_getValue("bookIndex","");
document.getElementById("title").value=GM_getValue("doubanTitle","");
if(GM_getValue("doubanIsbn")) document.getElementById("isbn").value=GM_getValue("doubanIsbn","");
if(GM_getValue("doubanPubdate","")) document.getElementById("publishTime").value=GM_getValue("doubanPubdate","");
document.getElementById("author").value=GM_getValue("doubanAuthor","");
document.getElementById("publisher").value=GM_getValue("doubanPublisher","");
}
function clickFirst(){
document.getElementById("Map").areas[1].click();
setTimeout(function(){clickSecond()},1000);
}
setTimeout(function(){clickFirst()},500);
}
GM_setValue('gotoRent',false);
}
}
if(location.href.indexOf('gdufs.edu.cn')!=-1&&prefs.school!="GDUFS"){//广外
var rentTable=document.getElementsByTagName("table");
rentTable=rentTable[6];
function GDUFS_interLending(){
var bookIndex=this.parentNode.parentNode.cells[5].textContent;
GM_setValue("bookIndex",bookIndex);
GM_setValue("rentSchool","gdufs");
GM_setValue("gotoRent",true);
GM_openInTab("http://www.gdtgw.cn:8080/#.html");
}
for (var s = 1; s < rentTable.rows.length; s++) {
var recbtn=document.createElement("a");
recbtn.setAttribute("class","recbtn");
recbtn.innerHTML="十校互借";
rentTable.rows[s].cells[9].innerHTML='';
rentTable.rows[s].cells[9].appendChild(recbtn);
recbtn.addEventListener("click",GDUFS_interLending,false);
};
}
if(location.href.indexOf('202.116.64.108:8991')!=-1&&prefs.school!="SYSU"){//中大
var rentTable=document.getElementsByTagName("table");
rentTable=rentTable[6];
function SYSU_interLending(){
var bookIndex=this.parentNode.parentNode.cells[6].textContent;
GM_setValue("bookIndex",bookIndex);
GM_setValue("rentSchool","sysu");
GM_setValue("gotoRent",true);
GM_openInTab("http://www.gdtgw.cn:8080/#.html");
}
for (var s = 1; s < rentTable.rows.length; s++) {
var recbtn=document.createElement("a");
recbtn.setAttribute("class","recbtn");
recbtn.innerHTML="十校互借";
rentTable.rows[s].cells[9].innerHTML='';
rentTable.rows[s].cells[9].appendChild(recbtn);
recbtn.addEventListener("click",SYSU_interLending,false);
};
}
if(location.href.indexOf('http://202.38.232.10/opac/servlet/opac.go')!=-1&&prefs.school!="SCUT"){//华理工
var rentTable=document.getElementById("queryholding");
if(rentTable){
//break;
//return null;
function SCUT_interLending(){
var bookIndex=this.parentNode.parentNode.cells[2].textContent;
var title=document.getElementById("bookName").getAttribute("value");
var infoTable=document.getElementsByClassName("left12")[0].getElementsByTagName("table")[0];
ISBN = infoTable.textContent;
ISBN = ISBN.replace(/\n/g,"").replace(/ /g,"").match(/ISBN(\d|-)+/)[0].slice(4);
publisher = infoTable.rows[2].cells[1].textContent;
pubDate = publisher.match(/\d+/);
publisher = publisher.slice(0,publisher.indexOf(pubDate)-2);
author = infoTable.rows[1].cells[1].getElementsByTagName("a")[0].innerHTML;
GM_setValue("bookIndex",bookIndex);
GM_setValue("rentSchool","scut");
GM_setValue("gotoRent",true);
GM_setValue("doubanTitle",title);
GM_setValue("doubanPubdate",pubDate);
GM_setValue("doubanPublisher",publisher);
GM_setValue("doubanAuthor",author);
//alert(ISBN);
GM_setValue("doubanIsbn",ISBN);
GM_openInTab("http://www.gdtgw.cn:8080/#.html");
}
rentTable=rentTable.rows[0].cells[0].getElementsByTagName("table")[0];
for (var s = 1; s < rentTable.rows.length; s++) {
var recbtn=document.createElement("a");
recbtn.setAttribute("class","recbtn");
recbtn.innerHTML="十校互借";
var btncell=rentTable.rows[s].cells[3];
btncell.appendChild(recbtn);
recbtn.addEventListener("click",SCUT_interLending,false);
};
}
}
if(location.href.indexOf('lib.gzhu.edu.cn:8080/bookle/search2/detail')!=-1&&prefs.school!="GZHU"){//广州大学
var rentTable=document.getElementsByClassName("book_holding")[0];
function GZHU_interLending(){
var infoTable=document.getElementsByClassName("book_detail")[0];
var bookIndex=infoTable.rows[5].cells[1].textContent;
var publisher = infoTable.rows[0].cells[1].textContent;
var pubDate = publisher.match(/\d+/);
pubDate=pubDate.toString();
publisher=publisher.slice(0,publisher.indexOf(pubDate)-1);
var title=document.getElementsByTagName("title")[0].textContent.slice(13,-1);
var author=infoTable.rows[1].cells[1].textContent.replace(/\n/g,"").replace(/ /g,"");
//alert(publisher+bookIndex+pubDate+title);
GM_setValue("doubanTitle",title);
if(pubDate) GM_setValue("doubanPubdate",pubDate.toString());
GM_setValue("doubanPublisher",publisher);
GM_setValue("doubanAuthor",author);
//GM_setValue("bookIndex",bookIndex);
GM_setValue("rentSchool","gzhu");
GM_setValue("gotoRent",true);
GM_setValue("doubanTitle",title);
//GM_setValue("doubanIsbn",bookisbn);
GM_openInTab("http://www.gdtgw.cn:8080/#.html");
}
for (var s = 1; s < rentTable.rows.length; s++) {
var recbtn=document.createElement("a");
recbtn.setAttribute("class","recbtn");
recbtn.innerHTML="十校互借";
var btncell=rentTable.rows[s].cells[6];
btncell.appendChild(recbtn);
recbtn.addEventListener("click",GZHU_interLending,false);
};
}
if(location.href.indexOf('http://210.38.102.131:86/opac/item.php?marc_no=')!=-1&&prefs.school!="GZHTCM"){//广中医
var rentTable=document.getElementById("item");
function GZHTCM_interLending(){
var infoTable=document.getElementsByClassName("booklist");
var bookIndex=this.parentNode.parentNode.cells[0].textContent;
var publisher =infoTable[1].getElementsByTagName("dd")[0].textContent;
var pubDate = publisher.match(/\d+/);
pubDate=pubDate.toString();
var ISBN=infoTable[2].getElementsByTagName("dd")[0].textContent.match(/(\d|-)+/);
ISBN=ISBN[0];
publisher=publisher.slice(0,publisher.indexOf(pubDate)-1);
var title=document.getElementsByTagName("title")[0].textContent;
var author=infoTable[0].getElementsByTagName("dd")[0].textContent;
author = author.slice(author.indexOf('/')+1)
GM_setValue("doubanTitle",title);
GM_setValue("doubanIsbn",ISBN);
GM_setValue("doubanPubdate",pubDate);
GM_setValue("doubanPublisher",publisher);
GM_setValue("doubanAuthor",author);
GM_setValue("bookIndex",bookIndex);
GM_setValue("rentSchool","gzhtcm");
GM_setValue("gotoRent",true);
GM_openInTab("http://www.gdtgw.cn:8080/#.html");
}
for (var s = 1; s < rentTable.rows.length; s++) {
var recbtn=document.createElement("a");
recbtn.setAttribute("class","recbtn");
recbtn.innerHTML="十校互借";
var btncell=rentTable.rows[s].cells[2];
btncell.appendChild(recbtn);
recbtn.addEventListener("click",GZHTCM_interLending,false);
};
}
if(location.href.indexOf('http://202.116.41.246:8080/opac/item.php?marc_no=')!=-1&&prefs.school!="SCNU"){//华师
var rentTable=document.getElementById("item");
function SCNU_interLending(){
var infoTable=document.getElementsByClassName("booklist");
var bookIndex=this.parentNode.parentNode.cells[0].textContent;
var publisher =infoTable[1].getElementsByTagName("dd")[0].textContent;
var pubDate = publisher.match(/\d+/);
pubDate=pubDate.toString()
var ISBN=infoTable[2].getElementsByTagName("dd")[0].textContent.match(/(\d|-)+/);
ISBN=ISBN[0];
publisher=publisher.slice(0,publisher.indexOf(pubDate)-1);
var title=document.getElementsByTagName("title")[0].textContent;
var author=infoTable[0].getElementsByTagName("dd")[0].textContent;
author = author.slice(author.indexOf('/')+1)
//alert(publisher+bookIndex+pubDate+title);
GM_setValue("doubanTitle",title);
GM_setValue("doubanIsbn",ISBN);
//alert(GM_getValue("doubanIsbn"));
GM_setValue("doubanPubdate",pubDate);
GM_setValue("doubanPublisher",publisher);
GM_setValue("doubanAuthor",author);
GM_setValue("bookIndex",bookIndex);
GM_setValue("rentSchool","scnu");
GM_setValue("gotoRent",true);
GM_openInTab("http://www.gdtgw.cn:8080/#.html");
}
for (var s = 1; s < rentTable.rows.length; s++) {
var recbtn=document.createElement("a");
recbtn.setAttribute("class","recbtn");
recbtn.innerHTML="十校互借";
var btncell=rentTable.rows[s].cells[2];
btncell.appendChild(recbtn);
recbtn.addEventListener("click",SCNU_interLending,false);
};
}
if(location.href.indexOf('http://222.200.98.171:81/bookinfo.aspx?ctrlno=')!=-1&&prefs.school!="GDUT"){//广东工业大学
var rentTable=document.getElementById("bardiv").getElementsByTagName("table")[0];
function GDUT_interLending(){
var infoTable=document.getElementById("ctl00_ContentPlaceHolder1_bookcardinfolbl");
var bookIndex=this.parentNode.parentNode.cells[1].textContent;
var publisher =infoTable.getElementsByTagName("a")[0].innerHTML;
if(pubDate = infoTable.textContent.match(/\d+\.?\d*/)) pubDate=pubDate.toString();
var ISBN=infoTable.textContent.replace(/\n/g,"").match(/ISBN(\d|-)+/)[0];
ISBN=ISBN.slice(4)
var title=infoTable.textContent.slice(0,infoTable.textContent.indexOf("/")).replace(/ +/g,"");
var author=infoTable.textContent.slice(infoTable.textContent.indexOf("/")+1,infoTable.textContent.indexOf("—")-1);
GM_setValue("doubanTitle",title);
GM_setValue("doubanIsbn",ISBN);
GM_setValue("doubanPubdate",pubDate);
GM_setValue("doubanPublisher",publisher);
GM_setValue("doubanAuthor",author);
GM_setValue("bookIndex",bookIndex);
GM_setValue("rentSchool","gdut");
GM_setValue("gotoRent",true);
GM_setValue("doubanTitle",title);
GM_openInTab("http://www.gdtgw.cn:8080/#.html");
}
for (var s = 1; s < rentTable.rows.length; s++) {
var recbtn=document.createElement("a");
recbtn.setAttribute("class","recbtn");
recbtn.innerHTML="十校互借";
var btncell=rentTable.rows[s].cells[6];
btncell.appendChild(recbtn);
recbtn.addEventListener("click",GDUT_interLending,false);
};
}
if(location.href.indexOf('http://121.33.246.167/opac/bookinfo.aspx?ctrlno=')!=-1&&prefs.school!="GZARTS"){//广州美术学院
var rentTable=document.getElementById("bardiv").getElementsByTagName("table")[0];
function GZARTS_interLending(){
var infoTable=document.getElementById("ctl00_ContentPlaceHolder1_bookcardinfolbl");
//alert(infoTable.textContent);
var bookIndex=this.parentNode.parentNode.cells[1].textContent;
var publisher =infoTable.getElementsByTagName("a")[0].innerHTML;
if(pubDate = infoTable.textContent.match(/\d+\.?\d*/)) pubDate=pubDate.toString();
var ISBN=infoTable.textContent.replace(/\n/g,"").match(/ISBN(\d|-)+/)[0];
ISBN=ISBN.slice(4)
var title=infoTable.textContent.slice(0,infoTable.textContent.indexOf("/")).replace(/ +/g,"");
var author=infoTable.textContent.slice(infoTable.textContent.indexOf("/")+1,infoTable.textContent.indexOf("—")-1);
GM_setValue("doubanTitle",title);
GM_setValue("doubanIsbn",ISBN);
GM_setValue("doubanPubdate",pubDate);
GM_setValue("doubanPublisher",publisher);
GM_setValue("doubanAuthor",author);
GM_setValue("bookIndex",bookIndex);
GM_setValue("rentSchool","gzarts");
GM_setValue("gotoRent",true);
GM_setValue("doubanTitle",title);
GM_openInTab("http://www.gdtgw.cn:8080/#.html");
}
//alert(rentTable.textContent);
for (var s = 1; s < rentTable.rows.length; s++) {
//let bookIndex=rentTable.rows[s].cells[5].textContent;
var recbtn=document.createElement("a");
recbtn.setAttribute("class","recbtn");
recbtn.innerHTML="十校互借";
var btncell=rentTable.rows[s].cells[6];
btncell.appendChild(recbtn);
recbtn.addEventListener("click",GZARTS_interLending,false);
};
}
if(location.href.indexOf('http://218.192.148.33:81/bookinfo.aspx?ctrlno=')!=-1&&prefs.school!="XHCOM"){//星海音乐学院
var rentTable=document.getElementById("bardiv").getElementsByTagName("table")[0];
function XHCOM_interLending(){
var infoTable=document.getElementById("ctl00_ContentPlaceHolder1_bookcardinfolbl");
var bookIndex=this.parentNode.parentNode.cells[1].textContent;
var publisher =infoTable.getElementsByTagName("a")[0].innerHTML;
if(pubDate = infoTable.textContent.match(/\d+\.?\d*/)) pubDate=pubDate.toString();
var ISBN=infoTable.textContent.replace(/\n/g,"").match(/ISBN(\d|-)+/)[0];
ISBN=ISBN.slice(4)
var title=infoTable.textContent.slice(0,infoTable.textContent.indexOf("/")).replace(/ +/g,"");
var author=infoTable.textContent.slice(infoTable.textContent.indexOf("/")+1,infoTable.textContent.indexOf("—")-1);
GM_setValue("doubanTitle",title);
GM_setValue("doubanIsbn",ISBN);
GM_setValue("doubanPubdate",pubDate);
GM_setValue("doubanPublisher",publisher);
GM_setValue("doubanAuthor",author);
GM_setValue("bookIndex",bookIndex);
GM_setValue("rentSchool","xhcm");
GM_setValue("gotoRent",true);
GM_setValue("doubanTitle",title);
GM_openInTab("http://www.gdtgw.cn:8080/#.html");
}
for (var s = 1; s < rentTable.rows.length; s++) {
//let bookIndex=rentTable.rows[s].cells[5].textContent;
var recbtn=document.createElement("a");
recbtn.setAttribute("class","recbtn");
recbtn.innerHTML="十校互借";
var btncell=rentTable.rows[s].cells[6];
btncell.appendChild(recbtn);
recbtn.addEventListener("click",XHCOM_interLending,false);
};
} | | | | | | | | | | | | | |