Skip to content

Instantly share code, notes, and snippets.

@azu
Last active July 29, 2020 10:29
Show Gist options
  • Save azu/74dee7481a7feb2302cbc566d55f0fb7 to your computer and use it in GitHub Desktop.
Save azu/74dee7481a7feb2302cbc566d55f0fb7 to your computer and use it in GitHub Desktop.
検索結果でテキストをコピーすると入る"ウェブ検索結果" and "検索結果"を削除する
// ==UserScript==
// @name Google: remove hidden text
// @description 検索結果でテキストをコピーすると入る"ウェブ検索結果"と"検索結果"を削除する
// @namespace info.efcl.google
// @match https://www.google.*/search*
// @grant none
// @version 1.0
// @author azu
// ==/UserScript==
Array.from(document.querySelectorAll("h1")).filter(element => element.textContent === "検索結果").forEach(element => element.remove());
Array.from(document.querySelectorAll("h2")).filter(element => element.textContent === "ウェブ検索結果").forEach(element => element.remove());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment