Greasy Fork

Greasy Fork is available in English.

新版CSDN阅读体验提升

自动阅读全文;布局位置格式优化;删除上方导航、左侧分享、右下侧广告、下侧内容推荐;保留作者、相关文章、评论

当前为 2017-10-10 提交的版本,查看 最新版本

// ==UserScript==
// @name         新版CSDN阅读体验提升
// @namespace    http://www.csdn.net/
// @version      0.0.1-20171010
// @description  自动阅读全文;布局位置格式优化;删除上方导航、左侧分享、右下侧广告、下侧内容推荐;保留作者、相关文章、评论
// @author       limity
// @license      GPL version 3
// @match        http://blog.csdn.net/*/article/details/*
// @grant        none
// @run-at  document-end
// ==/UserScript==

(function() {
	'use strict';
	var jQuery = $ || window.$;
  
	var orig = $.fn.css;
	jQuery.fn.css = function() {
		var ev = new jQuery.Event('style');
		orig.apply(this, arguments);
		jQuery(this).trigger(ev);
	}
  
	try {
    
		jQuery('.article_content').on("style", function() {
			var _contentStyle = jQuery(".article_content").get(0).style;
			_contentStyle.overflow = "";
			_contentStyle.height = "";
			jQuery('.article_content').removeClass('article_Hide');
			jQuery('.readall_box').hide().addClass('readall_box_nobg');
		});
    
    jQuery("h1").css({"text-align": "center"});
    jQuery("body > .container").css({"width":"1300px","padding":"20px 0 0"});
    jQuery(".container main").css({"width":"1024px","padding":"0 0 0 30px"});
    jQuery(".container aside").css({"width":"260px"});
		jQuery(".article_content p").css({
			"font-family": "微软雅黑,Consolas",
      "font-size":"15px",
			"text-indent": "2em",
			"line-height": "1.75em",
			"margin": "1em 0"
		});
    jQuery(".article_content p img").css({
			"display": "block",
			"margin": "0 auto"
		});
    jQuery("header,.left_fixed,.recommend_tit,.recommend_list,.fixRight").hide();
    
	} catch (e) {
		console.log(e);
	}
})();