代碼:
// ==UserScript==
// @name csdn改版v1.0
// @version 1
// @grant none
// @include https://bbs.csdn.net/*
// @require http://libs.baidu.com/jquery/2.0.0/jquery.min.js
// ==/UserScript==
//設置發帖按鈕
$(".btns").prepend("<li style='background:green;border-radius:5px;height: 32px; margin-top: 6px;'><a style='color:#fff; line-height:32px;' href='" + $("a:contains('我要發貼')").attr("href") + "'>發帖</a></li>");
$("#rightList").remove();//移除右側欄
$("#post_feed_wrap").remove();
$(".post_recommend").remove();
$("#left-box").css("cssText","float: left;width:100% !important;");//加寬左框
$(".topic_r").css("width","100%");//加寬帖子正文區域
$(".control").css("cssText","bottom:0px !important;");//時間靠底部
使用方法(以Firefox爲例):
安裝好油猴子後右上角會出現猴頭的圖標,點擊它,然後再點“新建用戶腳本”,將裏面自帶的代碼刪掉,將我上面的代碼(包含//註釋的代碼)都複製進去Ctrl+S即可。