您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Ao3 main menu dropdowns are no longer visible at hover, you have to click the menu entry instead
当前为
// ==UserScript== // @name AO3: Disable Hover in Main Menu // @description Ao3 main menu dropdowns are no longer visible at hover, you have to click the menu entry instead // @version 1.0 // @author escctrl // @namespace https://greasyfork.org/en/users/906106-escctrl // @match https://archiveofourown.org/* // @require https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js // @grant none // @license MIT // ==/UserScript== (function($) { 'use strict'; // AO3 original menus seem to be built with Bootstrap JS, assumption based on existance of data-* attributes // Dropdown-on-hover doesn't seem to be native to Bootstrap, AO3 may have additional JS to make that work // hack inspired by this comment: https://stackoverflow.com/a/19191435/22187458 // when a li.dropdown is being hovered over, Ao3 tries to show its ul.dropdown-menu entries -> we force-hide them again // tested in Firefox: when clicking on the (still visible) a.dropdown-toggle inside of li.dropdown, ul.dropdown-menu appears (per native Bootstrap, probably) $('ul.primary.navigation.actions li.dropdown').hover(function() { $(this).find('.dropdown-menu').hide(); }); })(jQuery);