Last active
July 26, 2026 03:44
-
-
Save sendarionn/8cbb29cf2678b53bcd65b2ec53f9d6a1 to your computer and use it in GitHub Desktop.
前後に文字列を追加してGoogleで検索するブックマークレット
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:(()=>{const selection=window.getSelection()?.toString();if(!selection)return;const prefix=prompt('検索キーワードの前に追加する文字列','');if(prefix===null)return;const suffix=prompt('検索キーワードの後ろに追加する文字列','');if(suffix===null)return;const query=`${prefix?prefix+' ':''}${selection}${suffix?' '+suffix:''}`;window.open(`https://www.google.com/search?q=${encodeURIComponent(query)}`,'_blank','noopener,noreferrer');})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment