iPadでWebChatGPTみたいなことをしたかったので作りました。
WebChatGPT like bookmarklets for Safari on iPad/iPhone -- G:Google and D:DuckDuckGo
G①
javascript:open('http://google.com/search?num=5&q='+document.querySelector('textarea').value);
G②
JavaScript:r='Web%20search%20results:%5Cn%5Cn';links=document.querySelectorAll('.yuRUbf%3Ea');%20bodys=document.querySelectorAll('.VwiC3b');r=r+'%5B1%5D%22'+links%5B0%5D.textContent+'%5Ct'+bodys%5B0%5D.textContent+'%22%5CnURL:%20'+links%5B0%5D+'%5Cn%5Cn';r=r+'%5B2%5D%22'+links%5B1%5D.textContent+'%5Ct'+bodys%5B1%5D.textContent+'%22%5CnURL:%20'+links%5B1%5D+'%5Cn%5Cn';r=r+'%5B3%5D%22'+links%5B2%5D.textContent+'%5Ct'+bodys%5B2%5D.textContent+'%22%5CnURL:%20'+links%5B2%5D+'%5Cn%5Cn';dt=new%20Date();r=r+'Current%20date:'+dt.getFullYear()+'/'+dt.getMonth()+'/'+dt.getDay()+'%5Cn%5CnInstructions:%20Using%20the%20provided%20web%20search%20results,%20write%20a%20comprehensive%20reply%20to%20the%20given%20query.%20Make%20sure%20to%20cite%20results%20using%20%5B%5Bnumber%5D(URL)%5D%20notation%20after%20the%20reference.%20If%20the%20provided%20search%20results%20refer%20to%20multiple%20subjects%20with%20the%20same%20name,%20write%20separate%20answers%20for%20each%20subject.%5CnQuery:'+document.querySelector('textarea').value+'%5CnReply%20in%20日本語';document.querySelector('textarea').textContent=r;document.querySelector('textarea').select();document.execCommand('copy');close();
G③
JavaScript:document.querySelector('textarea').select();document.execCommand('paste');
D①
javascript:open('http://duckduckgo.com/?q='+document.querySelector('textarea').value);
D②
JavaScript:r='Web%20search%20results%5Cn%5Cn';links=document.querySelectorAll('.LnpumSThxEWMIsDdAT17%3Ea');bodys=document.querySelectorAll('.OgdwYG6KE2qthn9XQWFC');r=r+'%5B1%5D%22'+links%5B0%5D.textContent+'%5Ct'+bodys%5B0%5D.textContent+'%22%5CnURL:'+links%5B0%5D+'%5Cn%5Cn';r=r+'%5B2%5D%22'+links%5B1%5D.textContent+'%5Ct'+bodys%5B1%5D.textContent+'%22%5CnURL:'+links%5B1%5D+'%5Cn%5Cn';r=r+'%5B3%5D%22'+links%5B2%5D.textContent+'%5Ct'+bodys%5B2%5D.textContent+'%22%5CnURL:'+links%5B2%5D+'%5Cn%5Cn';dt=new%20Date();r=r+'Current%20date:'+dt.getFullYear()+'/'+dt.getMonth()+'/'+dt.getDay()+'%5Cn%5CnInstructions:Using%20the%20provided%20web%20search%20results%20write%20a%20comprehensive%20reply%20to%20the%20given%20query%20Make%20sure%20to%20cite%20results%20using%20%5B%5Bnumber%5D(URL)%5D%20notation%20after%20the%20reference.%20If%20the%20provided%20search%20results%20refer%20to%20multiple%20subjects%20with%20the%20same%20name%20write%20separate%20answers%20for%20each%20subject%5Cn%20Query:'+document.forms.x.q.value+'%5Cn%20Reply%20in%20日本語';document.forms.x.q.value=r;document.forms.x.q.select();document.execCommand('copy');close();
D③
JavaScript:document.querySelector('textarea').select();document.execCommand('paste');
この記事が気に入ったらサポートをしてみませんか?