// ==UserScript== // @name Miniflux - External links // @description 「全ての外部リンクをコピー」ボタンを追加 // @match https://*/unread // @match https://*/feed/*/entries* // ==/UserScript== const clip = 'Download more icon variants from https://tabler-icons.io/i/clipboard'; const check = 'Download more icon variants from https://tabler-icons.io/i/clipboard-check'; let a = document.createElement("a"); a.href = "#"; a.innerHTML = clip + "全ての外部リンクをコピー"; a.addEventListener("click", () => { let links = Array.from(document.querySelectorAll(".item-meta-icons > li:nth-of-type(3) > a")).map(r => r.href); navigator.clipboard.writeText(links.join("\n")); li.removeChild(a); let em = document.createElement("em"); li.appendChild(em); em.innerHTML = check + "コピーしました"; }); let li = document.createElement("li"); li.appendChild(a); document.querySelector("section.page-header ul").appendChild(li);