// ==UserScript==
// @name 精简快科技(驱动之家)新闻站
// @description 精简快科技新闻站
// @icon http://www.drivergenius.com//favicon.ico
// @namespace https://greasyfork.org/users/204104
// @version 1.1
// @author 佚名
// @include http*://*.mydrivers.com/*
// @downloadURL none
// ==/UserScript==
(function () {
//文章页精简
var isContentPage = /.*htm$/.test(location.href) && /^http(s)?:\/\/news\.mydrivers\.com\/.*$/.test(location.href)
if (isContentPage) {
$(".xianguan").remove();
$(".main_right").remove();
$("body").html($(".main_box").html().replace('
', '
'))
}
// 首页精简
var checkHigh = window.location.href.match(/mydrivers\.com\/$/);//检查首页
var newsList = null;
if (checkHigh) {
$(".main_right").remove();
$(".main_2").remove();
newsList = $(".main").first().html();
}
if (newsList) {
newsList = newsList.replace('class="main_left"','class="main_left" style="margin:0 auto;float:none;"');
$("body").html(newsList);
}
})()