- 各ページのリンクを取得してリンクごとに改行した状態で文字列として取得
javascript:(function() {
// 各ページのリンクを取得してリンクごとに改行した状態で文字列として取得
var res = [...document.querySelectorAll('a.lillie')].map(elem => elem.href).join('\n');
// コピーするためにtextareaを生成
var textarea = document.createElement('textarea');
// textareaにリンクの文字列をペースト
textarea.textContent = res;
// bodyの最後の要素として追加
document.body.appendChild(textarea);
// textareaにペーストした内容を選択した状態にする
textarea.select();
// ブラウザ機能のcopyを実行
document.execCommand('copy');
// bodyの最後の要素を削除
document.body.removeChild(textarea);
}())
javascript:(function() { var res = [...document.querySelectorAll('article a.ArticleList_link__4Igs4')].map(elem => elem.href).join('\n'); var textarea = document.createElement('textarea'); textarea.textContent = res; document.body.appendChild(textarea); textarea.select(); document.execCommand('copy'); document.body.removeChild(textarea); }())