CSDN Reformater

hide everything except author information and main content.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name         CSDN Reformater
// @namespace    http://www.csdn.net/
// @version      0.1.2
// @description  hide everything except author information and main content.
// @author       Mianjune Hong
// @license      GPL version 3
// @match        *://blog.csdn.net/*/article/details/*
// @grant        none
// @run-at       document-idle
// ==/UserScript==


(function () {
    'use strict';

    $('#btn-readmore').click();
    $('script').remove();

    var info = $('<aside style="float: none;"></aside>');
    $('#asideProfile > .aside-title').remove();
    info.append($('#asideProfile'));
    info.mouseleave(function(){$('#asideProfile').css('display','none');});
    $('#mainBox>main div.article-title-box').mouseenter(function(){$('#asideProfile').css('display','');}).mouseleave(function(){$('#asideProfile').css('display','none');});

    $('#mainBox>main div.article-title-box').append(info);
    $('#mainBox').attr('style', 'margin: 2em auto;max-width: 66em;');

    $('html>head').append('<style type="text/css">body>*, #mainBox>*, main>*, recommend-ad-box{display:none!important;}#mainBox, #mainBox>main, main>.blog-content-box, main, #author>aside{display:block!important;} main{width:100%!important;} body{min-width:0!important;background:#f5f6f7!important;}</style>');
    // div.recommend-box{display: block !important;padding-top: 6em;}

    info.mouseleave();
})();