您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hides the sidebar on the Arch Linux wiki. The sidebar can be toggled with a button.
当前为
// ==UserScript== // @name Hide Arch Wiki Sidebar // @description Hides the sidebar on the Arch Linux wiki. The sidebar can be toggled with a button. // @version 0.1.3 // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js // @include http://wiki.archlinux.org/* // @include https://wiki.archlinux.org/* // @grant none // @namespace https://gf.qytechs.cn/users/13329 // ==/UserScript== // make a "show sidebar" button mimicing the "watch" button var watch_button = $('li#ca-watch'); var sidebar_button = watch_button.clone(); // change the duplicated "watch" button link to have the properties we want for // the "show sidebar" button var sidebar_toggle = sidebar_button.find('a') .text('show sidebar') .unbind('click') .removeAttr('href') .attr('id', 'ca-toggle-sidebar') .attr('accesskey', 'i') .attr('title', 'Toggle the sidebar [Alt+Shift+i]'); // put the new "show sidebar" button after the "watch" button sidebar_button.insertAfter(watch_button); var sidebar = $('div#column-one').find('div:gt(3)'); var content = $('div#content'); var original_margin = content.css('margin-left'); // toggle_sidebar shows or hides the sidebar, updating the "show sidebar" // button link text to match function toggle_sidebar() { if (sidebar.is(':visible')) { sidebar_toggle.text('show sidebar'); sidebar.hide(); content.css('margin-left', '0px'); } else { sidebar_toggle.text('hide sidebar'); sidebar.show(); content.css('margin-left', original_margin); } } // bind the toggle_sidebar function to the "show sidebar" button link sidebar_toggle.click(toggle_sidebar); // sidebar is hidden by default toggle_sidebar();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址