Changeset 24983
- Timestamp:
- 11/27/08 00:41:57 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/trunk/stella.js
r24964 r24983 121 121 : '??:??'); 122 122 123 function setWithBackup (target, values) { 124 let backup = target.__stella_backup = {}; 125 for (let [name, value] in Iterator(values)) { 126 backup[name] = target[name]; 127 target[name] = value; 128 } 129 liberator.log(target.__stella_backup) 130 } 131 132 function restoreFromBackup (target, doDelete) { 133 if (!target.__stella_backup) 134 return; 135 for (let [name, value] in Iterator(target.__stella_backup)) 136 target[name] = value; 137 if (doDelete) 138 delete target.__stella_backup; 139 } 140 123 141 // }}} 124 142 … … 160 178 fileExtension: 'r', 161 179 fileURL: '', 180 fullscreen: '', 162 181 muted: '', 163 182 pause: '', … … 167 186 title: '', 168 187 totalTime: '', 169 volume: '' 188 volume: '', 170 189 // auto setting => fetch maxVolume playOrPause seek seekRelative turnUpDownVolume 171 190 }, … … 270 289 currentTime: 'rw', 271 290 fileURL: 'r', 291 fullscreen: 'rwt', 272 292 muted: 'rwt', 273 293 pause: 'x', … … 291 311 let (as = content.document.defaultView.wrappedJSObject.swfArgs) 292 312 ('http://www.youtube.com/get_video?fmt=22&video_id=' + as.video_id + '&t=' + as.t), 313 314 get fullscreen () this.player.__stella_fullscreen, 315 // FIXME - 元に戻らない 316 set fullscreen () { 317 this.player.__stella_fullscreen = !this.player.__stella_fullscreen; 318 if (this.fullscreen) { 319 liberator.log('full') 320 setWithBackup(this.player.style, { 321 position: 'fixed', 322 left: '0px', 323 top: '0px', 324 width: content.innerWidth + 'px', 325 height: content.innerHeight + 'px' 326 }); 327 } else { 328 liberator.log('normal') 329 restoreFromBackup(this.player.style); 330 } 331 }, 293 332 294 333 get muted () this.player.isMuted(), … … 610 649 add('seek', 'seek', 'seekRelative'); 611 650 add('fetch', 'fetch'); 651 add('fullscreen', 'fullscreen'); 612 652 }, 613 653
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)