Greasy Fork

来自缓存

Greasy Fork is available in English.

豆瓣读书直达江苏大学图书馆搜索

豆瓣读书直达江苏大学图书馆搜索,方便找书

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         豆瓣读书直达江苏大学图书馆搜索
// @namespace    https://blog.xlab.app/
// @more         https://github.com/ttttmr/UserJS
// @version      0.3
// @description  豆瓣读书直达江苏大学图书馆搜索,方便找书
// @author       tmr
// @include      https://book.douban.com/*
// @grant        none
// ==/UserScript==

(function () {
  'use strict';
  let title = document.getElementsByTagName('h1')[0].children[0].innerText;
  let info = document.getElementById('info');
  let liblink = document.createElement('a');
  let isbn = info.innerText.match(/\d{13}|\d{10}/)[0];
  liblink.href =
    'http://huiwen.ujs.edu.cn:8080/opac/openlink.php?strSearchType=isbn&match_flag=full&historyCount=1&strText=' +
    isbn +
    '&doctype=ALL&with_ebook=on&displaypg=20&showmode=list&sort=CATA_DATE&orderby=desc&location=ALL';
  liblink.target = '_blank';
  liblink.innerText = '去江苏大学图书馆搜索';
  info.appendChild(liblink);
})();