NGA界面精简

删除NGA论坛头图、版头、分版,减少NSFW内容,参考Shy07需要的时候可以点击版面名字显示(替换跳转功能)

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

Bạn sẽ cần cài đặt một tiện ích mở rộng như Tampermonkey hoặc Violentmonkey để cài đặt kịch bản này.

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

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

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

You will need to install a user script manager extension to install this script.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         NGA界面精简
// @namespace    https://greatest.deepsurf.us/zh-CN/scripts/382989-nga%E7%95%8C%E9%9D%A2%E7%B2%BE%E7%AE%80
// @version      0.3
// @description  删除NGA论坛头图、版头、分版,减少NSFW内容,参考Shy07需要的时候可以点击版面名字显示(替换跳转功能)
// @author       SkywalkerJi
// @match        *://nga.178.com/*
// @match        *://bbs.ngacn.cc/*
// @match        *://bbs.nga.cn/*
// @grant        none
// ==/UserScript==

(function() {
	'use strict';
    let topPic = document.querySelector('#custombg');
    topPic.removeChild(topPic.firstChild);
	let subForumsC = document.querySelector('#sub_forums_c');
	subForumsC.style.display = 'none';
    let toppedTopic = document.querySelector('#toppedtopic');
    toppedTopic.style.display = 'none';
	const toggle = () => {
		toppedTopic.style.display = toppedTopic.style.display === 'none' ? 'block' : 'none';
		subForumsC.style.display = subForumsC.style.display === 'none' ? 'block' : 'none';
	};

	const container = document.querySelector('#toptopics a[class="block_txt block_txt_c0"]');
	container.href = 'javascript:;';
	container.addEventListener('click', toggle);
})();