diff options
author | anekos | 2011-06-07 04:07:34 +0900 |
---|---|---|
committer | anekos | 2011-06-07 04:08:44 +0900 |
commit | 7eaf3037a993b72d95f630902a2c19d929ada602 (patch) | |
tree | 4433c9251d2289898ae7fa98453fb6128dac1764 /stella.js | |
parent | 9cfb5d9d53086142ff2d42ae710822f5f2310e5c (diff) | |
download | vimperator-plugins-7eaf3037a993b72d95f630902a2c19d929ada602.tar.bz2 |
RegExp の関数的な呼び出しができなくなったので修正 for Firefox5
Diffstat (limited to 'stella.js')
-rw-r--r-- | stella.js | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -380,11 +380,11 @@ Thanks: // 上手い具合に秒数に直すよ fromTimeCode: function (code, max) { var m; - if (max && (m = /^(-?\d+(?:\.\d)?)%/(code))) + if (max && (m = /^(-?\d+(?:\.\d)?)%/.exec(code))) return Math.round(max * (parseFloat(m[1]) / 100)); - if (m = /^(([-+]?)\d+):(\d+)$/(code)) + if (m = /^(([-+]?)\d+):(\d+)$/.exec(code)) return parseInt(m[1], 10) * 60 + (m[2] == '-' ? -1 : 1) * parseInt(m[3], 10); - if (m = /^([-+]?\d+\.\d+)$/(code)) + if (m = /^([-+]?\d+\.\d+)$/.exec(code)) return Math.round(parseFloat(m[1]) * 60); return parseInt(code, 10); }, @@ -834,7 +834,7 @@ Thanks: } YouTubePlayer.getIDfromURL = function (url) let ([_, r] = url.match(/[?;&]v=([-\w]+)/)) r; - YouTubePlayer.isVideoURL = function (url) /^https?:\/\/(www\.)?youtube\.com\/watch\?.+/(url); + YouTubePlayer.isVideoURL = function (url) /^https?:\/\/(www\.)?youtube\.com\/watch\?.+/.test(url); YouTubePlayer.prototype = { __proto__: Player.prototype, |