From a819abe04af7dd7efe6c8f029a51d48c2a2a19a7 Mon Sep 17 00:00:00 2001
From: drry
Date: Tue, 23 Sep 2008 15:48:18 +0000
Subject: * 正規表現を修正しました。 * ほか。
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@19785 d0d07461-0603-4401-acd4-de1884942a52
---
haiku.js | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
(limited to 'haiku.js')
diff --git a/haiku.js b/haiku.js
index f3e71fb..f0f6a65 100644
--- a/haiku.js
+++ b/haiku.js
@@ -80,7 +80,7 @@
var html = .toSource()
@@ -107,27 +107,27 @@
liberator.echo(html, true);
}
function convert(str){
- function createHTML(url,userid){
+ function createHTML(all){
var str = '';
- if (userid){
- str = 'id:'+userid+''
- } else if (/\.(?:jpe?g|gif|png|bmp)$/.test(url)){
- str = '';
- } else if (/^http:\/\/www\.youtube\.com\/(?:watch\?v=|v\/)([-\w]+)$/.test(url)){
+ if (all.indexOf("id:") == 0){
+ str = '' + all + ''
+ } else if (/\.(?:jpe?g|gif|png|bmp)$/.test(all)){
+ str = '
';
+ } else if (/^http:\/\/www\.youtube\.com\/(?:watch\?v=|v\/)([-\w]+)$/.test(all)){
var url = "http://www.youtube.com/v/" + RegExp.$1;
str = '' + url + '\n' +
'