CSDN Reading mode togger

用于csdn博客阅读时内容区域扩大

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

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

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

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

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

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         CSDN Reading mode togger
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  用于csdn博客阅读时内容区域扩大
// @author       宏斌
// @match        https://blog.csdn.net/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    const okBtn = document.createElement('button');
    okBtn.id = 'ReadingMode';
    okBtn.setAttribute('class','option-box');
    okBtn.innerText = 'R'
//    $(".blog-content-box").append(okBtn);
//    $(".more-toolbox").append(okBtn);
    $('.left-toolbox').append(okBtn);
    $("#ReadingMode").css({ width: '50px',height:'50px','border-radius':'2px','background-color':'#fff','font-size':'25px','color':'#fff'});
    $('#ReadingMode').css({"background": 'linear-gradient(145deg, #bcbcbc, #e0e0e0)','box-shadow':  '5px 5px 34px #969696, -5px -5px 34px #ffffff'});
    const mystyles = document.createElement('style');
    mystyles.type = 'text/css';
    $("head").append(mystyles);
    $("#mainBox").css("transition","width 0.3s linear");
    $("#rightAside").css("transition","width 0.3s linear");
    mystyles.innerHTML = `.fillWidth{width: 100% !important} .zeroWidth{width: 0 !important}`;
    $("#ReadingMode").on('click',() => {
    $("#mainBox").toggleClass('fillWidth');
    $('main').toggleClass('fillWidth');
    $("#rightAside").toggleClass("zeroWidth");



})
})();