ブックマークレット
2020/11/3 8:51:00
==
javascript: (async ()=>{window.open(`https://dlt.kitetu.com/?kw=${encodeURIComponent(new Date().toLocaleDateString("ja-JP").split("/").map((a, i)=>a+["年", "月", "日"][i]).join(""))}&dln={${new Date().getFullYear()+"年" + (new Date().getMonth()+1)+"月"}}> ${encodeURIComponent("\n")}<-{${new Date(Date.now()-24*60*60*1000).toLocaleDateString("ja-JP").split("/").map((a, i)=>a+["年", "月", "日"][i]).join("")}} ${encodeURIComponent("\n")}{${new Date(Date.now()+24*60*60*1000).toLocaleDateString("ja-JP").split("/").map((a, i)=>a+["年", "月", "日"][i]).join("")}}->${encodeURIComponent("\n\n"+await fetch("https://dlt.kitetu.com/KNo.EDD2/A52F-4881?dln&fmt=src").then(r=>r.text()).catch(alert))}`)})()
javascript: (async ()=>{window.open(`https://dlt.kitetu.com/?kw=${encodeURIComponent(new Date().toLocaleDateString("ja-JP").split("/").map((a, i)=>a+["年", "月", "日"][i]).join(""))}&dln={${new Date().getFullYear()+"年" + (new Date().getMonth()+1)+"月"}}> ${encodeURIComponent("\n")}<-{${new Date(Date.now()-24*60*60*1000).toLocaleDateString("ja-JP").split("/").map((a, i)=>a+["年", "月", "日"][i]).join("")}} ${encodeURIComponent("\n")}{${new Date(Date.now()+24*60*60*1000).toLocaleDateString("ja-JP").split("/").map((a, i)=>a+["年", "月", "日"][i]).join("")}}->${encodeURIComponent("\n\n"+await fetch("https://dlt.kitetu.com/KNo.EDD2/A52F-4881?dln&fmt=src").then(r=>r.text()))}`)})()
javascript:(()=>{window.open(`https://dlt.kitetu.com/?kw=${encodeURIComponent(new Date().toLocaleDateString("ja-JP").split("/").map((a, i)=>a+["年", "月", "日"][i]).join(""))}&dln={${new Date().getFullYear()+"年" + (new Date().getMonth()+1)+"月"}}> ${encodeURIComponent("\n")}<-{${new Date(Date.now()-24*60*60*1000).toLocaleDateString("ja-JP").split("/").map((a, i)=>a+["年", "月", "日"][i]).join("")}} ${encodeURIComponent("\n")}{${new Date(Date.now()+24*60*60*1000).toLocaleDateString("ja-JP").split("/").map((a, i)=>a+["年", "月", "日"][i]).join("")}}->${encodeURIComponent("\n+{ルーチン K#/A52F-4881}")}`)})()
javascript: t25348709 = [...document.querySelectorAll("table")].map(table=>{return [...table.querySelectorAll("tr")].map(tr=>{return "|" + [...tr.querySelectorAll("th,td")].map(cell=>{if(cell.tagName==="TH") {return "*"+cell.textContent.replaceAll("\n","").trim()+" ";}return cell.textContent.replaceAll("\n","").trim()+" ";}).join("|");}).join("\n");}).join("\n\n");if(navigator.clipboard) {navigator.clipboard.writeText(t25348709).then(()=>{alert("Table is copied");}).catch(error=>{alert("Copy failed: \n\t"+error);});} else {alert(t25348709)}
javascript: navigator.clipboard.writeText( [...document.querySelectorAll("table")].map(table=>{ return [...table.querySelectorAll("tr")].map(tr=>{ return "|" + [...tr.querySelectorAll("th,td")].map(cell=>{ if(cell.tagName==="TH") { return "*"+cell.textContent.replaceAll("\n","").trim()+" "; } return cell.textContent.replaceAll("\n","").trim()+" "; }).join("|"); }).join("\n"); }).join("\n\n") ).then(()=>{ alert("Table is copied"); }).catch(error=>{ alert("Copy failed: \n\t"+error); });
t25348709 = [...document.querySelectorAll("table")].map(table=>{
return [...table.querySelectorAll("tr")].map(tr=>{
return "|" + [...tr.querySelectorAll("th,td")].map(cell=>{
if(cell.tagName==="TH") {
return "*"+cell.textContent.replaceAll("\n","").trim()+" ";
}
return cell.textContent.replaceAll("\n","").trim()+" ";
}).join("|");
}).join("\n");
}).join("\n\n");
if(navigator.clipboard) {
navigator.clipboard.writeText(t25348709).then(()=>{
alert("Table is copied");
}).catch(error=>{
alert("Copy failed: \n\t"+error);
});
} else {
alert(t25348709)
}
javascript: (()=>{window.open(`https://dlt.kitetu.com/?kw=${(new Date()).toLocaleString("ja-JP", {year:"numeric", month: "long", day: "numeric", hour: "numeric", minute: "numeric", second:"numeric"})}`)})();
javascript: (()=>{window.open("https://dlt.kitetu.com/?kw="+(new Date()).toLocaleDateString("ja-JP", {year:"numeric", month: "long", day: "numeric"}))})();
javascript:window.open(`https://dlt.kitetu.com/?kw=『${document.title}』`)
使う時はURLをコピーしてから実行すると良い。
javascript: window.open("https://dlt.kitetu.com/?kw="+(new Date()).toLocaleDateString("ja-JP", {year:"numeric", month: "long", day: "numeric"}))
javascript: document.location.href="https://dlt.kitetu.com/?kw="+(new Date()).toLocaleDateString("ja-JP", {year:"numeric", month: "long", day: "numeric"})
javascript: alert(self.crypto.randomUUID().slice(-4))
プログラムを500行とか書きたくない。10行ぐらいで課題解決したい。
最近作った10行ぐらいで課題解決するプログラム。ブラウザのブックマークに登録して実行するやつ(ブックマークレット)。こういうのが好き。
javascript: (()=>{
const html = `<a href = "${location.href}">\n <img src="${location.href}/thumb/300#.jpg"/>\n</a>`;
if( navigator.clipboard.writeText(html) ){
alert(`thumbneil code copied`);
} else {
alert(`error`);
}
})();
こういうのを個人的に竹槍と呼んでいる。簡単に作れて役に立つ。
javascript: (()=>{
const html = `<a href = "${location.href}">\n <img src="${location.href}/thumb/300#.jpg"/>\n</a>`;
if( navigator.clipboard.writeText(html) ){
alert(`thumbneil code copied`);
} else {
alert(`error`);
}
})();
javascript: alert(`<a href = "${location.href}"><img src="${location.href}/thumb/300#.jpg"/></a>`)