Literature mutual helper

①Show ssid/dxid from Library Reference Alliance (ucdrs) or Duxiu (duxiu) ②Show ssno from CADAL ③Provide links from ucdrs, duxiu, cadal to Douban Books

< Feedback on Literature mutual helper

Question/comment

§
Posted: 2022-12-03

点击复制ss号功能无效。
Firefox 访问 book.dglib.superlib.net。ss号可显示,但点击旁边的复制按钮无效。

TheronAuthor
§
Posted: 2022-12-03

我这firefox复制没问题,你看下控制台有报错吗?还有,是否启用了同类脚本?

§
Posted: 2022-12-04

我这只启用了这一个脚本,但是复制无效,如下修改后通过了:
1、// @grant GM_setClipboard
2、function copyText(text) {
// 复制相关代码参考 https://greasyfork.org/zh-CN/scripts/437492
/*if (navigator.clipboard) {
navigator.clipboard.writeText(text);
} else {
let textarea = document.createElement("textarea");
document.body.appendChild(textarea);
textarea.style.position = "absolute";
textarea.style.clip = "rect(0 0 0 0)";
textarea.value = text;
textarea.select();
document.execCommand("copy", true);
textarea.remove();
}*/
GM_setClipboard(text);
}

TheronAuthor
§
Posted: 2022-12-04

GM_setClipboard这个省事,谢谢反馈,我测试下,后面可以用这个内置函数替换

Post reply

Sign in to post a reply.