AmazonVideo Speed

Saves the set playback speed on Netflix

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         AmazonVideo Speed
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Saves the set playback speed on Netflix
// @author       Bobocato
// @match        https://www.amazon.de/*
// @match        https://www.amazon.com/*
// @match        https://www.amazon.co.uk/*
// @grant        none
// ==/UserScript==

function setEvents(video){
    //Safe Playback Rate
    video.onratechange = function() {
        var speedup = video.playbackRate - localStorage.getItem("playrate");
        if((Math.round(speedup *10)/10) == 0.1 ||(Math.round(speedup *10)/10) == -0.1 ){
            localStorage.setItem("playrate", video.playbackRate);
        }
    };

    //Set volume and playbackrate as soon as video starts playing
    video.onplaying = function() {
        if (localStorage.getItem("playrate") !== null){
            video.playbackRate = localStorage.getItem("playrate");
        }
    };
}

function setSettings(video){
    if (localStorage.getItem("playrate") !== null){
        video.playbackRate = localStorage.getItem("playrate");
    }
}

(function() {
    'use strict';
    setInterval(function(){
        var video = document.getElementsByTagName("video");
        for(var i = 0; i < video.length; i++){
            if(typeof(video[i]) != "undefined"){
                setEvents(video[i]);
                setSettings(video[i]);
            }
        }
    }, 2500);
})();