去网易博客顶栏和尾栏

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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);