LoginSignup
0
1

More than 5 years have passed since last update.

iOSでタイトルとURLをマークダウンでコピーするブックマークレット

Last updated at Posted at 2018-09-03

タイトルとURLをマークダウンでコピーするブックマークレットです。

下記で紹介されていたx shoji様のブックマークレットに少しだけ手を加えさせていただいてマークダウンでコピーできるようにしました。
iOS(iPhone)でWebページのタイトルとURLをワンタップでコピーするBookmarklet - Qiita

タイトルとURLをマークダウンでコピーする

javascript:var%20global=window;global.COPY_TO_CLIPBOARD=global.COPY_TO_CLIPBOARD%7C%7C%7B%7D;global.COPY_TO_CLIPBOARD.copyToClipboard=function()%7Bvar%20a=document.createElement(%22textarea%22);a.textContent=%22%5B%22+document.title+%22%5D(%22+document.URL+%22)%22;var%20b=document.getElementsByTagName(%22body%22)%5B0%5D;b.appendChild(a);a.contentEditable=!0;a.readOnly=!1;a.setSelectionRange(0,999999);document.execCommand(%22copy%22);b.removeChild(a)%7D;global.COPY_TO_CLIPBOARD.copyToClipboard();

このページで実行した結果

[タイトルとURLをマークダウンでコピーするブックマークレット - Qiita](https://qiita.com/maboy/private/2a4a4641b514703031b8)

Qiitaのトップで実行した結果

[Qiita](https://qiita.com/)
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1