bungie-hideheader

This hides the video header at the top of the Bungie webpage. The video is obnoxious. Version 3 also hides the regular banner. Version 4 also hides promo ads.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        bungie-hideheader
// @namespace   SamPittman
// @include     https://www.bungie.net/*
// @version     4
// @grant       none
// @description This hides the video header at the top of the Bungie webpage.  The video is obnoxious.  Version 3 also hides the regular banner. Version 4 also hides promo ads.

// ==/UserScript==

//console.log('= Hide bungie header =');

// remove the stupid "promo" advertisement
var badSpan = document.evaluate("//a[contains(concat(' ',normalize-space(@class),' '), 'promo')]",
		document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
var badHtmlElement = badSpan.snapshotItem (0);
//console.log(badHtmlElement);
if ( null != badHtmlElement) badHtmlElement.style.visibility = 'hidden';

var badSpan = document.evaluate("//*[@class='video-link']",
		document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
//console.log(badSpan);
var badHtmlElement = badSpan.snapshotItem (0);
//console.log(badHtmlElement);
if ( null != badHtmlElement) badHtmlElement.style.visibility = 'hidden';

var badSpan = document.evaluate("//*[@class='callout ']",
		document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
var badHtmlElement = badSpan.snapshotItem (0);
//console.log(badHtmlElement);
if ( null != badHtmlElement) badHtmlElement.style.visibility = 'hidden';