<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>karupoimou</author_name>
  <author_url>https://blog.hatena.ne.jp/karupoimou/</author_url>
  <blog_title>なろう分析記録</blog_title>
  <blog_url>https://karupoimou.hatenablog.com/</blog_url>
  <categories>
    <anon>ブラウザ拡張機能開発</anon>
    <anon>プログラミング</anon>
  </categories>
  <description>コンテクストメニューでURLを取得 webページのリンクを右クリックした時のメニューから、選択中のURLを取得するコードです。 出来ること これを応用することで、取得したURLを加工して、別のページに飛ばしたりすることができます。 実装のスクリーンショット デバッグ表示 サンプルコード //a hrefリンクのURLを取得 chrome.contextMenus.create({ &quot;title&quot;:&quot;URLをデバッグに表示&quot;, &quot;type&quot;:&quot;normal&quot;, &quot;contexts&quot;:[&quot;link&quot;], &quot;onclick&quot;:function(info){ //ここで取得 info.linkUrlが…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkarupoimou.hatenablog.com%2Fentry%2F2019%2F04%2F28%2F091023&quot; title=&quot;chrome拡張機能開発　コンテクストメニューで右クリックした時に選択したリンクを取得するサンプコード - なろう分析記録&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/k/karupoimou/20190428/20190428090557.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-04-28 09:10:23</published>
  <title>chrome拡張機能開発　コンテクストメニューで右クリックした時に選択したリンクを取得するサンプコード</title>
  <type>rich</type>
  <url>https://karupoimou.hatenablog.com/entry/2019/04/28/091023</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
