Greasy Fork

Greasy Fork is available in English.

网页标签logo标题修改

上班打酱油,可以修改成公司内部网站信息。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         网页标签logo标题修改
// @description  上班打酱油,可以修改成公司内部网站信息。
// @icon         https://www.spacex.com/static/images/favicon.ico
// @namespace    http://tampermonkey.net/
// @version      v2.1
// @description  try to take over the world!
// @author       何必
// @match        *.douyin.com/*
// @match        *douyin.*
// @match       *://www.douyin.com/*
// @grant        none
// @license      AGPL License
// ==/UserScript==

(function() {
window.onload = function () {
      const changeFavicon = link => {
        let $favicon = document.querySelector('link[rel="shortcut icon"]');
        // If a <link rel="shortcut icon"> element already exists,
        // change its href to the given link.
        if ($favicon !== null) {
          $favicon.href = link;
          // Otherwise, create a new element and append it to <head>.
        } else {
          $favicon = document.createElement("link");
          $favicon.rel = "shortcut icon";
          $favicon.href = link;
          document.head.appendChild($favicon);
        }
      };
      let icon = "https://www.spacex.com/static/images/favicon.ico"; // 图片地址,自行修改
      changeFavicon(icon); // 动态修改网站图标

 document.title = '网页名称,自行修改';
};
window.onblur = function () {
 document.title = '网页名称,自行修改';
};

})();