aboutsummaryrefslogtreecommitdiffstats
path: root/hints-for-embedded.js
diff options
context:
space:
mode:
authoranekos2011-01-21 09:02:51 +0900
committeranekos2011-01-21 09:02:51 +0900
commitc6ace7aa4bebfbcea6aafce3397d04e2392a2a23 (patch)
treeefcbaa372b0e2b0784a625f1171362fd28501f33 /hints-for-embedded.js
parentdf62410ad871ea3557672c944954a322afdb9cd5 (diff)
downloadvimperator-plugins-c6ace7aa4bebfbcea6aafce3397d04e2392a2a23.tar.bz2
ytimg なやつに対応
Diffstat (limited to 'hints-for-embedded.js')
-rw-r--r--hints-for-embedded.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/hints-for-embedded.js b/hints-for-embedded.js
index e1703d3..5b7845a 100644
--- a/hints-for-embedded.js
+++ b/hints-for-embedded.js
@@ -38,13 +38,13 @@ let PLUGIN_INFO =
<name>Hints For Embedded Objects</name>
<description>Add the hints mode for Embedded objects.</description>
<description lang="ja">埋め込み(embed)オブジェクト用ヒントモード</description>
- <version>1.3.1</version>
+ <version>1.4.0</version>
<author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author>
<license>new BSD License (Please read the source code comments of this plugin)</license>
<license lang="ja">修正BSDライセンス (ソースコードのコメントを参照してください)</license>
<updateURL>https://github.com/vimpr/vimperator-plugins/raw/master/hints-for-embedded.js</updateURL>
<minVersion>2.3</minVersion>
- <maxVersion>2.3</maxVersion>
+ <maxVersion>2.4</maxVersion>
<detail><![CDATA[
:embhint:
Show hints for embedded objects.
@@ -176,6 +176,12 @@ let INFO =
value: /youtube\.com\/v\/([-a-zA-Z0-9_]+)/,
url: function (id) ('http://www.youtube.com/watch?v=' + id)
},
+ youtube_image: {
+ site: /ytimg\.com/,
+ name: /^flashvars$/,
+ value: /video_id=([-a-zA-Z0-9_]+)/,
+ url: function (id) ('http://www.youtube.com/watch?v=' + id)
+ },
vimeo: {
site: /vimeo/,
name: /.*/,
@@ -216,8 +222,9 @@ let INFO =
if (site) {
for each (let [n, v] in info) {
+ if (site.name && !site.name(n))
+ continue;
let m = n.match(site.value) || v.match(site.value);
- liberator.log(v);
if (m)
return site.url(Array.slice(m, 1));
}