aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrry2008-12-16 14:48:43 +0000
committerdrry2008-12-16 14:48:43 +0000
commit7543cfc6863832c79870ea494c81b63aadc78ef3 (patch)
tree47857f7e50da7d6d82c4ebeadb291d8abd604393
parentb80ccfa3c4c9454c91ecc2182a5d90729b33ec53 (diff)
downloadvimperator-plugins-7543cfc6863832c79870ea494c81b63aadc78ef3.tar.bz2
* fixed regexes.
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@26897 d0d07461-0603-4401-acd4-de1884942a52
-rw-r--r--haiku.js2
-rw-r--r--matanico.js6
-rw-r--r--nico_related_videos.js2
-rw-r--r--nicontroller.js2
-rw-r--r--stella.js4
5 files changed, 7 insertions, 9 deletions
diff --git a/haiku.js b/haiku.js
index 410e97b..39176c9 100644
--- a/haiku.js
+++ b/haiku.js
@@ -177,7 +177,7 @@
'<div><object width="300" height="250" data="' + url + '" type="application/x-shockwave-flash">'+
'<param name="wmode" value="transparent"/><param name="allowFullScreen" value="true"/>'+
'</object></div>';
- } else if (/^http:\/\/www\.nicovideo\.jp\/watch\/([-\w]+)$/.test(all)){
+ } else if (/^http:\/\/[^.]+\.nicovideo\.jp\/watch\/([-\w]+)$/.test(all)){
str = '<iframe width="312" height="176" src="http://ext.nicovideo.jp/thumb/'+RegExp.$1 + '" scrolling="no">'+
'<a href="' + all + '">' +all+'</a></iframe>';
} else if (all.charAt(0) == "["){
diff --git a/matanico.js b/matanico.js
index 2d94ab0..625c66e 100644
--- a/matanico.js
+++ b/matanico.js
@@ -121,10 +121,10 @@ NicoScraper.prototype = {
_constants: {
VERSION: '0.70',
PAGECHECK: {
- watch: '^http://(es|www)\\.nicovideo\\.jp/watch/',
+ watch: '^http://[^.]+\\.nicovideo\\.jp/watch/',
live: '^http://live\\.nicovideo\\.jp/watch/',
- tag: '^http://(es|www)\\.nicovideo\\.jp/tag/',
- relatedTag: '^http://(es|www)\\.nicovideo\\.jp/related_tag/',
+ tag: '^http://[^.]+\\.nicovideo\\.jp/tag/',
+ relatedTag: '^http://[^.]+\\.nicovideo\\.jp/related_tag/',
},
},
diff --git a/nico_related_videos.js b/nico_related_videos.js
index ce0cc1a..40700ec 100644
--- a/nico_related_videos.js
+++ b/nico_related_videos.js
@@ -26,7 +26,7 @@
(function () {
function getVideoId () {
- let m = buffer.URL.match(/^http:\/\/www\.nicovideo\.jp\/watch\/([a-z0-9]+)/);
+ let m = buffer.URL.match(/^http:\/\/(?:tw|es|de|www)\.nicovideo\.jp\/watch\/([a-z0-9]+)/);
return m && m[1];
}
diff --git a/nicontroller.js b/nicontroller.js
index 02c0836..4add0bf 100644
--- a/nicontroller.js
+++ b/nicontroller.js
@@ -193,7 +193,7 @@ NicoPlayerController.prototype = {
NICO_DOMAIN: '.nicovideo.jp',
NICO_URL: 'http://www.nicovideo.jp/',
- WATCH_URL: 'http://www.nicovideo.jp/watch/',
+ WATCH_URL: '^http://[^.]+\.nicovideo\.jp/watch/',
WATCH_PAGE: 1,
FLVPLAYER_NODE_ID: 'flvplayer',
diff --git a/stella.js b/stella.js
index ee38c7c..d0b3939 100644
--- a/stella.js
+++ b/stella.js
@@ -45,8 +45,6 @@ var PLUGIN_INFO =
<license lang="ja">修正BSDライセンス (ソースコードのコメントを参照してください)</license>
<minVersion>2.0pre</minVersion>
<maxVersion>2.0pre</maxVersion>
- <license><![CDATA[
- ]]></license>
<detail><![CDATA[
== Commands ==
:stpl[ay]:
@@ -428,7 +426,7 @@ Thanks:
get title () undefined,
- get isValid () /^http:\/\/(es|www)\.nicovideo\.jp\/watch\//.test(buffer.URL),
+ get isValid () /^http:\/\/(tw|es|de|www)\.nicovideo\.jp\/watch\//.test(buffer.URL),
get volume () undefined,
set volume (value) value,