Greasy Fork

Greasy Fork is available in English.

驱动之家净化阅读 - 文章样式调整

驱动之家阅读文章样式调整

当前为 2019-03-27 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         驱动之家净化阅读 - 文章样式调整
// @namespace    http://tampermonkey.net/
// @version      0.5
// @description  驱动之家阅读文章样式调整
// @author       zengyufei
// @match        http://www.mydrivers.com/
// @match        https://www.mydrivers.com/
// @match        https://news.mydrivers.com/
// @match        http://news.mydrivers.com/
// @match        https://news.mydrivers.com/class/**
// @match        http://news.mydrivers.com/**.htm
// @match        https://news.mydrivers.com/**.htm
// @grant        none
// @require      http://code.jquery.com/jquery-1.11.0.min.js
// ==/UserScript==

(function() {
    'use strict';

    var isContentPage = /.*htm$/.test(location.href)

    var isIndexPage = /^http(s)?:\/\/www\.mydrivers\.com\/$/.test(location.href)
    if (isContentPage) {
         $(".news_info>div").remove();
        $("#i_lastnext").remove();
        $(".pathway").remove();
        $(".baidu").remove();
        $(".top").remove();
        $(".weixin").remove();
        $(".news_xg").remove();
        $("#dummybodyid .news_box").attr("style", "width:1333px;");

        $("#dummybodyid .news_box .news_left").attr("style", "width:1333px;");

        $(".news_n").attr("style", "width:1230px;");
        $(".pinlun_input").attr("style", "width:1230px;");
        $(".plun_left_newplun").attr("style", "width:1230px;");
        $("#commentsiframe").attr("style", "width:92%;");
        $(".share table").attr("style", "width:85%;");
        $("#a_showhotnews_list_dia").remove();

        $("#dangbei_down").parent().remove();
        $(".news_bt1").remove();
        $(".zcdf").remove();
        $(".share").remove();
        $("#commentsiframe").remove();
        $("#footer").remove();
        $("div.news_box  div.news_right").remove();
    } else {
        if (isIndexPage) {
            var shidianDom = $(".shidian")
            shidianDom.next().next().remove();
            shidianDom.remove();
            $(".main_box").remove();
            var gcDom = $("#GC_box")
            gcDom.nextAll().remove();
            gcDom.remove();
            $(".nav_box").remove();
            $(".main_right").remove();
            $(".main_right_title").remove();
            $(".main").attr("style", "width:957px;");
        } else {
            $(".shidian").remove();
            $(".product_box").remove();
            $(".righttitle ").remove();
            $(".top_1_center ").remove();
            $(".pathway ").remove();
            $(".main_right div:not(:last-child)").remove();
            $(".link ").remove();
            $("#footer").remove();
        }
    }


    $(".footer_about").remove();


    $(".share table tbody tr td:lt(2)").remove();

    $(".yzm").css("margin-right", "30px");
})();