您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a link to profile in nav bar
// ==UserScript== // @name My Profile Link // @namespace http://tampermonkey.net/ // @license MIT // @version 0.2.1 // @description Adds a link to profile in nav bar // @author cass_per // @match https://spacehey.com/* // @match https://blog.spacehey.com/* // @match https://forum.spacehey.com/* // @match https://groups.spacehey.com/* // @match https://layouts.spacehey.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=spacehey.com // @grant none // ==/UserScript== var id = "YOUR ID HERE"; var user="YOUR USER HERE"; // can leave user blank if you have id as url (default option) const navi = document.getElementsByTagName("nav")[0].getElementsByClassName("links")[0]; var link = document.createElement("li"); link.innerHTML = "<a href='https://spacehey.com/profile?id="+ id +"'> Me</a>"; navi.prepend(link); var home = navi.getElementsByTagName("li")[1]; navi.prepend(home); var cur = window.location.href; if (cur == "https://spacehey.com/profile?id="+ id || cur == "https://spacehey.com/"+ user) { home.classList.remove("active"); link.classList.add("active"); }