Youtube Timelord

Adds a text input and button so you can set the time on youtube videos easy

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

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

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         Youtube Timelord
// @namespace    nulledroot
// @version      0.1
// @description  Adds a text input and button so you can set the time on youtube videos easy
// @author       Nulled Root
// @include http://www.youtube.com/*
// @include https://www.youtube.com/*
// @grant        none
// @downloadURL
// ==/UserScript==


(function() {
    'use strict';
    var onclickvalue = "timeValues = document.getElementById(\"yt-timelord\").value.split(\":\"); secondsValue = parseInt(timeValues[0])*60 + parseInt(timeValues[1]); newurl = document.URL.replace(/(&t=[0-9]*s)/g, '') + \"&t=\"+ secondsValue + \"s\"; window.location.href = newurl"
    var div = document.createElement("div")
    var input = document.createElement("input")
    var button = document.createElement("button")
    var id = document.createAttribute("id")
    var onClick = document.createAttribute("onclick")
    var size = document.createAttribute("size")
    var placeholder = document.createAttribute("placeholder")
    var dStyle = document.createAttribute("style")
    var iStyle = document.createAttribute("style")
    var bStyle = document.createAttribute("style")

    onClick.value = onclickvalue
    placeholder.value = "00:00"
    id.value = "yt-timelord"
    size.value = "4"
    iStyle.value = "background-color: hsla(0, 0%, 100%, .15); color:lightgray; border-color:transparent;"
    bStyle.value = "background-color: hsla(0, 0%, 100%, .08); color:lightgray; border-color:transparent;"
    dStyle.value = "float: right;"
    input.setAttributeNode(iStyle)
    input.setAttributeNode(placeholder)
    input.setAttributeNode(id)
    input.setAttributeNode(size)
    button.setAttributeNode(bStyle)
    button.setAttributeNode(onClick)
    button.innerHTML = 'Set Time';
    div.setAttributeNode(dStyle)
    div.appendChild(input)
    div.appendChild(button)
    document.getElementById('info').appendChild(div)
})();