您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
sobooks;nmod等图书网站将书籍名称(article-title)链接修改为豆瓣搜索链接,方便查看豆瓣评分,如有需要添加的网站列表可以给我留言
当前为
// ==UserScript== // @name sobooks,nmod等同框架书籍网站添加豆瓣跳转链接方便查看具体评分等信息 // @namespace http://tampermonkey.net/ // @version 0.12 // @description sobooks;nmod等图书网站将书籍名称(article-title)链接修改为豆瓣搜索链接,方便查看豆瓣评分,如有需要添加的网站列表可以给我留言 // @author You // @match https://sobooks.net/books/* // @match https://www.nmod.net/book/* // @icon https://www.google.com/s2/favicons?sz=64&domain=sobooks.net // @grant none // @license MIT // ==/UserScript== function downLoadLinks(){ // 将下载链接从跳转改成直链 let esecret = document.querySelector('body > section > div > div > article > div > b') var str = esecret.innerText var reg = /(蓝奏云盘:.+? 密码:)(.+?)(\n)/ var s = reg.exec(str)[2] console.log(s) async function copyPageUrl() { try { await navigator.clipboard.writeText(s); console.log('Page URL copied to clipboard'); } catch (err) { console.error('Failed to copy: ', err); } } copyPageUrl() let esecret_item = esecret.getElementsByTagName("a") for(var i=0; i<esecret_item.length;i++){ esecret_item[i].href = esecret_item[i].href.replace("https://sobooks.net/go.html?url=","") } } (function() { 'use strict'; let bookname = document.querySelector('header > h1 > a').innerText // console.log(bookname) document.querySelector('header > h1 > a').href = "https://www.douban.com/search?q=" + bookname document.querySelector('header > h1 > a').target = "_blank" downLoadLinks() })();