您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Have notifications as a nav link!
// ==UserScript== // @name Notification Navbar // @namespace http://tampermonkey.net/ // @version 0.15 // @description Have notifications as a nav link! // @author BigNibba // @include https://anilist.co/* // @grant none // ==/UserScript== (function() { 'use strict'; let loggedIn = true; let navDiv = document.getElementsByClassName("links")[0]; // gets the navbar for(let i = 0; i <= navDiv.childNodes.length-1;i++){ if(navDiv.childNodes[i].innerText == "Login"){loggedIn = false;} // sees if login is available meaning user is not logged in } if(loggedIn == true){ // if they are not logged in they won't be able to access notifications let notifLink = document.createElement("a"); notifLink.href="/notifications"; notifLink.style.padding = "13px"; notifLink.innerText = "Notifications"; notifLink.setAttribute("class","link"); navDiv.insertBefore(notifLink,navDiv.childNodes[12]); // Inserts the notification link before the search bar and after 'Forum' } })();