自定義 CSS + 自定義腳本。node
簡潔大方的白色導航欄 + 自動在中英文混排加入空格。spa
英文使用 open sans,中文信黑體。prototype
額外的好處是,以後修改別人答案時,腳本也會自動修正排版,免去了一個個修改之勞。code
userscript 核心代碼以下ip
document.addEventListener("DOMContentLoaded", function() { function each(a, f) { Array.prototype.forEach.call(a, f); } function autospace(text) { var except = '\x00-\xff,。、;:‘「「『」』《》〈〉?!¥…()【】〖〗[]「」‘’'; var re = new RegExp('[a-z0-9][^'+except+']|[^'+except+'][a-z0-9]', "i"), m, i = 0; m = text.nodeValue.search(re); while (m !== -1) { console.log(text, m); text = text.splitText(m+1); m = text.nodeValue.search(re); console.log(text, m); text.parentNode.insertBefore(document.createTextNode(" "), text); } } function eachchild(node) { if (node.nodeType === Node.ELEMENT_NODE) each(Array.prototype.slice.call(node.childNodes), function(x) { if (!/^(?:style|script)$/gi.test(x.nodeName)) { eachchild(x); } }); else if (node.nodeType === Node.TEXT_NODE) autospace(node); } eachchild(document.body); });