WEB前端开发博客 清爽特别版

最可恶的就是这个了, 整个页面全他妈的都是广告, 正文内容就那么一小丁点, 你让我是来看广告还是学习的, 果断都干掉

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

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

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

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

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

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

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         WEB前端开发博客 清爽特别版
// @namespace    https://greasyfork.org/zh-CN/scripts/370792
// @version      0.8
// @author       zhenhappy<[email protected]>
// @description  最可恶的就是这个了, 整个页面全他妈的都是广告, 正文内容就那么一小丁点, 你让我是来看广告还是学习的, 果断都干掉
// @match        http*://www.css88.com/*
// @require      https://unpkg.com/jquery/dist/jquery.slim.min.js
// @run-at       document-start
// @license      MIT
// ==/UserScript==

document.documentElement.style.display = 'none'

$(document).ready(() => {
  const doc = $('a[href="http://www.css88.com/tags"]').parent()
  doc.empty()
  doc.attr('class', 'menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children')
  doc.append('<a href="http://www.css88.com/nav/">前端中文文档</a>')
  doc.append('<ul class="sub-menu"></ul>')
  const subMenu = doc.children('.sub-menu')
  Array.prototype.forEach.call($('.container-tool > ul > li'), li => {
    const a = $(li).children().first()
    subMenu.append(`
      <li class="menu-item menu-item-type-taxonomy menu-item-object-category">
        <a href="${a.attr('href')}" style="width: 300px;">${a.text()}</a>
      </li>
    `)
  })
  subMenu.children().last().remove()
  $('#threebar, #secondary, .top-yideng-link, .basebreadcrumb, #home-page-widgets, .my-wallet, .related-wrap, .follow-wrap, .top-post-top-link, #site-navigation > ul > li:last-child').remove()
  document.documentElement.style.display = ''
})