>Форум Mozilla Россия http://forum.mozilla-russia.org/index.php >Скрипты http://forum.mozilla-russia.org/viewforum.php?id=37 >YouTube Auto Speed http://forum.mozilla-russia.org/viewtopic.php?id=70124 |
Tungen > 15-06-2016 15:27:12 |
Может кто знает, что в этом коде надо поправить, чтоб скрипт опять заработал? Выделить код Код:// ==UserScript== // @author maxph5555 // @name Increase YouTube speed and volume // @include *.youtube.com/watch* // @version 1.0 // ==/UserScript== unsafeWindow.onYouTubePlayerReady = function (playerId) { location.href = 'javascript:void((function () { document.getElementById("movie_player").setPlaybackRate(1.5); document.getElementById("movie_player").setVolume(100); })())'; }; |
Tungen > 15-06-2016 16:14:06 |
Вот достал из расширения для мозилы. скрытый текст Выделить код Код:var go_btn = document.getElementById('id_YPSCbtn'); var enableRememberSelectedSpeed = document.getElementById('enableRememberSelectedSpeed'); var enableUseHotkeys = document.getElementById('enableUseHotKeys'); var speed = document.getElementById('html5_video_play_speed_value'); //when button is clicked,play_Speed_Changer_go is started self.port.on("play_Speed_Changer_go", function start(rememberSelectedSpeedPref, UseHotkeysPref, storagePreviousSpeedPref) { //set ui as per setting enableRememberSelectedSpeed.checked = rememberSelectedSpeedPref; enableUseHotkeys.checked = UseHotkeysPref; if (storagePreviousSpeedPref != null && !isNaN(storagePreviousSpeedPref)) { //console.log("pSC.js" + storagePreviousSpeedPref); speed.value = storagePreviousSpeedPref; } else { speed.value = 1; } go_btn.onclick = function () { var speed = document.getElementById('html5_video_play_speed_value'); var speed_val = speed.value; self.port.emit("changing_now_speed_val", speed_val); }; enableRememberSelectedSpeed.onclick = function () { if (enableRememberSelectedSpeed.checked) { self.port.emit("changing_enableRememberSelectedSpeed", true); } else { self.port.emit("changing_enableRememberSelectedSpeed", false); } }; enableUseHotkeys.onclick = function () { if (enableUseHotkeys.checked) { self.port.emit("changing_enableUseHotkeys", true); } else { self.port.emit("changing_enableUseHotkeys", false); } }; }); //focus on input box for quick action self.port.on("show", function onShow() { speed.focus(); }); |