Restream template button

Adds a template button to restream.io that changes the title of videos

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         Restream template button
// @namespace    http://tamermonkey.net
// @version      0.1
// @description  Adds a template button to restream.io that changes the title of videos
// @author       Jacqueb
// @match        https://restream.io/titles
// @grant        none
// ==/UserScript==

var d = new Date();

if(d.getHours() <= 12) {window.realtime = "Morning"} else {window.realtime = "Evening"};
var wd = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];

setInterval(function() {if(document.getElementsByClassName("form-group")[0] != null) {if(document.getElementById("extrabutton") == null) {document.getElementsByClassName("sub-menu-block")[0].innerHTML += "<div style='margin-left: 120px; margin-top: 140px; position: absolute' id='extrabutton' id='mybutton' class='app-title-main__button'><input onclick='window.lol1 = true' type='button' class='button button_type_action' value='Template'></div>"}}},0)
setInterval(function() {document.getElementById("extrabutton").style.top = "180";
document.getElementById("extrabutton").style.left = "120"; if(window.lol1 == true) {makeDate();}},0);

setInterval(function() {if(document.getElementById("extrabutton") != null) {setStyles()}},0);
function setStyles() {
}

function makeDate() {
    document.getElementById("jsAllTitlesInput").value = 'PHPCG ' + (d.getMonth() + 1) + '/' + d.getDate() + '/' + d.getFullYear() + ' ' + wd[d.getDay()] + ' ' + realtime + ' Service';
    window.lol1 = false;
}