Greasy Fork

Greasy Fork is available in English.

Applize Weibo Header

Add transluscent effect to Weibo's title bar (WB_global_nav).

目前为 2019-05-12 提交的版本。查看 最新版本

// ==UserScript==
// @name         Applize Weibo Header
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Add transluscent effect to Weibo's title bar (WB_global_nav).
// @author       duoduoeeee
// @match        https://*.weibo.com
// @match        https://weibo.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
    var changeElement = document.getElementsByClassName("WB_global_nav_alpha")[0];
    changeElement.setAttribute("style", "-webkit-backdrop-filter: saturate(180%) blur(15px);backdrop-filter: saturate(180%) blur(20px);background-color: rgba(255, 255, 255, 0.7);");
    if (changeElement.hasAttribute("style", "-webkit-backdrop-filter: saturate(180%) blur(15px);") === true) {
      console.log("Appled!!");
    } else {
      console.log("gg");
    }
})();