bookmarklet: XのPOSTをScrapboxにコピー
code:javascript
javascript:(function(){finder=(tag,attr,value)=>...document.getElementsByTagName(tag).find(e=>e.getAttribute(attr)==value);loc=finder("link","rel","canonical").getAttribute("href");user=loc.split("/")3;href=loc.split("x.com")2;date=finder("a","href",href).text;content=finder("div","data-testid","tweetText").textContent;window.prompt("X Scrap Text",">"+loc+" @"+user+" - "+date+" "+content.split("\n").join("\n\t>"));})(); 元コード
code:javascript
javascript:(function(){
loc=finder("link","rel","canonical").getAttribute("href");
href=loc.split("x.com")2; date=finder("a","href",href).text;
content=finder("div","data-testid","tweetText").textContent;
})();
例
https://scrapbox.io/files/61f06e88196dd70022e92e78.png
これでメモリ節約できるかなあ..
* Chrome -> Edge 切り替えてみる
* Dropboxをインストールしない
* ローカルに開発環境をできるだけ置かない