From 5361fb29c592cc5634784f12b34767ecb1cff541 Mon Sep 17 00:00:00 2001
From: drry
Date: Mon, 22 Sep 2008 16:58:33 +0000
Subject: * 正規表現を修正しました。 * ほか。 * 酔っ払いコミット。
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@19745 d0d07461-0603-4401-acd4-de1884942a52
---
haiku.js | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
(limited to 'haiku.js')
diff --git a/haiku.js b/haiku.js
index bc07897..428594e 100644
--- a/haiku.js
+++ b/haiku.js
@@ -103,24 +103,22 @@
liberator.echo(html, true);
}
function convert(str){
- function createHTML(all, extension){
+ function createHTML(url){
var str = '';
- if (/\.(jpe?g|gif|png|bmp)$/.test(extension)){
- str = '';
- } else if (/^http:\/\/www\.youtube\.com\/(?:watch\?v=|v\/)([-\w]+)$/.test(all)){
+ if (/\.(?:jpe?g|gif|png|bmp)$/.test(url)){
+ str = '
';
+ } else if (/^http:\/\/www\.youtube\.com\/(?:watch\?v=|v\/)([-\w]+)$/.test(url)){
var url = "http://www.youtube.com/v/" + RegExp.$1;
str = '' + url + '\n' +
- '