ブックマークバーに登録して使用しているブックマークレット。
ページのタイトルを取得
意外とブラウザの標準機能に無い。
javascript:(()=>{const e=document.title,t=document.createElement("textarea");t.textContent=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),console.log(`Copyed this website title "${e}"`)})();
Google 検索結果を日本語以外でフィルタリング
ろくな情報が出てこない時に。
javascript:location.href+='&lr=-lang_ja';
amazon 商品URLを簡略化
クエリを除いてリンクを貼りたい時に。
javascript:location.href='http://www.amazon.co.jp/dp/'+document.getElementById('ASIN').value+'/';
YouTube 日本語自動翻訳を表示
設定 > 字幕 > 自動翻訳 > 日本語(最下部)
の自動化。
記事: YouTubeの日本語字幕表示を自動化
アドレス欄のURLを維持
各ブックマークレットの最後に追加する。
if(history.replaceState){history.replaceState({},null,location.href);};