美文网首页
掘金文章自动显示全文脚本

掘金文章自动显示全文脚本

作者: 宇宙小神特别萌 | 来源:发表于2019-08-01 13:20 被阅读0次

    1.首先参考安装 Tampermonkey:https://www.jianshu.com/p/caa21e6796bd

    2.掘金文章自动显示全文脚本

    // ==UserScript==
    // @name         掘金文章自动显示全文
    // @namespace    http://tampermonkey.net/
    // @version      0.1.1
    // @description  不用登录自动显示掘金博客全文
    // @author       Lynxz
    // @match        https://juejin.im/post/*
    // @match        https://juejin.im/entry/*
    // @require      http://code.jquery.com/jquery-latest.js
    // @grant        none
    // ==/UserScript==
    (function() {
        'use strict';
        // 隐藏 "显示全文" 按钮
        $('.show-full').remove();
        $('.show-full-block').remove();
        // 隐藏右侧边栏
        // entry 和 post 网址的侧边栏名称还不太一样
        $('.entry-public-aside').remove();
        $('div.entry-public-main.shadow').css('max-width','100%');
        $('.container .main-container').css('max-width','100%');
        $('.columen-view-aside').remove();
        $('.columen-view-main').css('max-width','100%');
        $('.container .entry-view').css('max-width','100%');
        $('.container .bottom-container').css('max-width','100%');
        // 显示全文,并取消最大高度限制
        let ct = $('div.post-content-container.hidden');
        ct.css('max-height','');
        ct.removeClass('hidden');
    })();
    

    相关文章

      网友评论

          本文标题:掘金文章自动显示全文脚本

          本文链接:https://www.haomeiwen.com/subject/qiyqdctx.html