<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hogashi</author_name>
  <author_url>https://blog.hatena.ne.jp/hogashi/</author_url>
  <blog_title>hogashi.*</blog_title>
  <blog_url>https://blog.hog.as/</blog_url>
  <categories>
    <anon>JavaScript</anon>
    <anon>ブックマークレット</anon>
  </categories>
  <description>ブックマークレットで文字列をコピーする (クリップボードに入れる) というのをよく書く。 昔ググってへ〜と思ったまま Document.execCommand() - Web API | MDN をずっと使っていた。(あと HTMLInputElement.select() - Web APIs | MDN も知らなくて、 Selection を使って頑張って文字列選択していた。) const value = 'これをコピーしたい'; // input をつくって body に入れる const input = document.createElement('input'); document…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.hog.as%2Fentry%2F2021%2F09%2F30%2F021450&quot; title=&quot;文字列をコピーするブックマークレットで使うクリップボードのAPI改めて見てた - hogashi.*&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/h/hogashi/20210930/20210930014938.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-09-30 02:14:50</published>
  <title>文字列をコピーするブックマークレットで使うクリップボードのAPI改めて見てた</title>
  <type>rich</type>
  <url>https://blog.hog.as/entry/2021/09/30/021450</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
