您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a custom node to the Google menu
- // ==UserScript==
- // @name You + Google Menu apt 2
- // @version 1.0
- // @description Adds a custom node to the Google menu
- // @author Your Name
- // @match https://vanced-youtube.neocities.org/2011/
- // @run-at document_end
- // @namespace https://greasyfork.org/users/1090996
- // ==/UserScript==
- (function() {
- 'use strict';
- // Create the new node
- var newNode = document.createElement('li');
- newNode.className = 'gbt';
- newNode.innerHTML = '<a onclick="gbar.qs(this)" class="gbzt" id="gb_2" href="http://www.google.com/imghp?hl=en&tab=wi"><span class="gbtb2"></span><span class="gbts">+You</span></a>';
- // Find the reference node to insert before
- var referenceNode = document.querySelector('li.gbt a#gb_1');
- // Insert the new node before the reference node
- if (referenceNode && referenceNode.parentNode && referenceNode.parentNode.parentNode) {
- referenceNode.parentNode.parentNode.insertBefore(newNode, referenceNode.parentNode);
- }
- })();