去网易博客顶栏和尾栏

去除网易博客未登录时讨厌的上下栏

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        去网易博客顶栏和尾栏
// @author      我喜欢的那女孩
// @description 去除网易博客未登录时讨厌的上下栏
// @include     http://*.blog.163.com/*
// @include     http://blog.163.com/*
// @version     0.1
// @grant       none
// allow pasting
// @namespace https://greasyfork.org/users/12554
// ==/UserScript==

//remove top
document.getElementById('blog-163-com-topbar').style.display = 'none';

//remove fixbar
setTimeout(function(){
    var fixbar = document.querySelector("div.fixedbar");
    if(fixbar !== null){
        fixbar.parentNode.removeChild(fixbar);
        console.log("移除lofter成功");
    }
    else{
        console.log("获取fixbar失败");
    }
}, 3000);

var timer = setInterval(function() {
    var node = document.querySelector('div.m-regGuideLayer');
    if(node !== null){
        node.parentNode.removeChild(node);
        clearInterval(timer);
        console.log("移除底栏成功");
    }
    else{
        console.log("获取元素失败");
    }
    //document.querySelector('div.m-regGuideLayer').style.display = 'none';
}, 2000);