您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a simple search box to the top bar of the Hacker News site.
// ==UserScript== // @name Hacker News Search // @namespace http://www.ryangittins.com/ // @author Ryan Gittins // @version 1.0.3 // @description Adds a simple search box to the top bar of the Hacker News site. // @match *://news.ycombinator.com/* // @copyright 2014 // @grant none // ==/UserScript== // Grab the top bar var selector = document.querySelector('td > table > tbody > tr'); // Insert a new td between the submit link and the login link var cell = selector.insertCell(2); // Inject the search box html into the header cell.innerHTML = '<span><form method="get" action="//hn.algolia.com/" style="margin:0;"><input style="height:20px;" type="text" name="q" size="16" placeholder="Search"></form></span>';