适用于 Chrome 浏览器。需要安装 Tampermonkey 插件。
解决了浏览器版本中,扇贝单词的笔记不支持换行的问题。
脚本内容如下:
// ==UserScript==
// @name Shanbay User Notes Fix
// @namespace http://cxuesong.com/
// @version 0.1
// @description 使得扇贝的 用户笔记 能够换行。
// @author CXuesong
// @match http://www.shanbay.com/review/learning/*
// @match http://www.shanbay.com/bdc/review/
// @grant none
// ==/UserScript==
function ShanBayFixUserNotes() {
$("#note-mine-box .content span").each(function () {
var html = "" + this.innerHTML;
var parent = this.parentElement;
parent.removeChild(this);
var p = document.createElement("pre");
p.innerHTML = html;
p.style.wordWrap = "word-wrap";
parent.appendChild(p);
});
}
window.setInterval(ShanBayFixUserNotes, 1000);

