博客園比CSDN干凈多了,唯一的問題是字體太小,看起來費勁。而且行內代碼的顏色和字體不太好,所以小小修改了一下。另外拉大了一點行間距。在這點上CSDN小勝。
個人很喜歡用Menlo字體作為代碼的字體(Xcode默認字體,很好看)。如果不支持的話也可以改成其他字體。
還有個問題是WinXP主題下頂欄會出現錯位的問題,修改了一下。我在Mac上的Safari看不對,不知道別的瀏覽器對不對。
優化前效果:

優化后效果:

油猴(TamperMonkey)中新建個腳本粘貼進去即可使用。
// ==UserScript==
// @name cnblogs博客園優化
// @namespace cnblogs
// @version 0.1
// @description Just optimize it. Not like fucking csdn.
// @author Sanders
// @match *://*.cnblogs.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
(function() {
'use strict';
const universalFontSize = "18px";
// 針對WinXP主題頂欄錯位問題
$(".HeaderBarTabBack").css("width", "2%");
// 標題大小
$("h1.postTitle").css("font-size", "24px");
$("h2").css("font-size", "22px");
$("h3").css("font-size", "20px");
// p標簽
$("p").css("font-size", universalFontSize);
$("p").css("line-height", "40px");
// 列表、表格標簽
$("li").css("font-size", universalFontSize);
$("tr").css("font-size", universalFontSize);
// code標簽
$("code").css("font-size", "15px");
$("code").css("font-weight", "normal");
$("code").css("font-family", "menlo");
$("code").css("color", "crimson");
// $(".postBody pre").css("margin-left", "20%");
// 表格居中
$(".table-wrapper").css("margin-left", "30%");
// 圖片居中
$(".postBody img").css("margin-left", "20%");
$(".postBody img").css("width", "70%");
})();
浙公網安備 33010602011771號