Changeset 37396
- Timestamp:
- 05/06/10 20:35:42 (3 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/trunk/stella.js
r37395 r37396 299 299 s.replace(/^[a-z]/, String.toUpperCase).replace(/-[a-z]/, function (s) s.slice(1).toUpperCase()), 300 300 301 currentURL: function () 302 content.document.location.href, 301 get currentURL() content.document.location.href, 303 302 304 303 download: function (url, filepath, ext, title, postData) { … … 696 695 get title () undefined, 697 696 698 get isValid () /^http:\/\/(tw|es|de|www)\.nicovideo\.jp\/watch\//.test( buffer.URL),697 get isValid () /^http:\/\/(tw|es|de|www)\.nicovideo\.jp\/watch\//.test(U.currentURL), 699 698 700 699 get volume () undefined, … … 992 991 get totalTime () parseInt(this.player.getDuration()), 993 992 994 get isValid () buffer.URL.match(/^http:\/\/(?:[^.]+\.)?youtube\.com\/watch/),993 get isValid () U.currentURL.match(/^http:\/\/(?:[^.]+\.)?youtube\.com\/watch/), 995 994 996 995 get volume () parseInt(this.player.getVolume()), … … 1001 1000 1002 1001 U.httpRequest( 1003 buffer.URL,1002 U.currentURL, 1004 1003 null, 1005 1004 function (xhr) { 1006 1005 let [, t] = xhr.responseText.match(/swfHTML.*&t=([^&]+)/); 1007 let id = YouTubePlayer.getIDfromURL( buffer.URL);1006 let id = YouTubePlayer.getIDfromURL(U.currentURL); 1008 1007 let url = "http://youtube.com/get_video?video_id=" + id + "&t=" + decodeURIComponent(t); 1009 1008 U.download(url, filepath, '.flv', self.title); … … 1084 1083 1085 1084 get cachedInfo () { 1086 let url = U.currentURL ();1085 let url = U.currentURL; 1087 1086 if (this.__info_cache.url != url) 1088 1087 this.__info_cache = {url: url}; … … 1109 1108 1110 1109 get id () 1111 let (m = U.currentURL ().match(/\/watch\/([a-z\d]+)/))1110 let (m = U.currentURL.match(/\/watch\/([a-z\d]+)/)) 1112 1111 (m && m[1]), 1113 1112 … … 1148 1147 1149 1148 function IDsFromAPI () { 1150 if (self.__rid_last_url == U.currentURL ())1149 if (self.__rid_last_url == U.currentURL) 1151 1150 return self.__rid_cache || []; 1152 1151 … … 1174 1173 } 1175 1174 1176 self.__rid_last_url = U.currentURL ();1175 self.__rid_last_url = U.currentURL; 1177 1176 self.__rid_cache = videos; 1178 1177 } catch (e) { … … 1258 1257 let self = this; 1259 1258 1260 let watchURL = buffer.URL;1259 let watchURL = U.currentURL; 1261 1260 let [,id] = watchURL.match(/watch\/(.+)$/); 1262 1261 let apiURL = 'http://www.nicovideo.jp/api/getflv?v=' + id; … … 1467 1466 U.xpathGet('//div[@class="title"]').textContent, 1468 1467 1469 get isValid () buffer.URL.match(/^http:\/\/(www\.)?vimeo\.com\/(channels\/(hd)?#)?\d+$/),1468 get isValid () U.currentURL.match(/^http:\/\/(www\.)?vimeo\.com\/(channels\/(hd)?#)?\d+$/), 1470 1469 1471 1470 // XXX setVolume は実際には存在しない?
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)