Test Video warnings

Warns to make test videos private

As of 2019-03-21. See the latest version.

// ==UserScript==
// @name         Test Video warnings
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  Warns to make test videos private
// @author       Jacqueb
// @match        https://www.youtube.com/*
// @grant        none
// ==/UserScript==

setInterval(function() {starter()},0);
function starter() {
    if(document.body.getElementsByTagName("A")[0] != null) {for(var z = 0; z < document.body.getElementsByTagName("A").length; z++) {if(document.body.getElementsByTagName("A")[z].getElementsByClassName("added")[0] == null) {if(document.body.getElementsByTagName("A")[z].innerText.toLowerCase().split("test")[1] != null) {document.body.getElementsByTagName("A")[z].innerHTML = document.body.getElementsByTagName("A")[z].innerText + "<b><span style='color: red' class='added'> Warning: make test videos private or unlisted!</span></b>"}}}}
    if(document.body.getElementsByTagName("A")[0] != null) {for(var z1 = 0; z1 < document.body.getElementsByTagName("A").length; z1++) {if(document.getElementsByTagName("A")[z1].id == "creator-editor-title-link") {if(document.getElementById("added2") == null) {if(document.body.getElementsByTagName("A")[z1].innerText.toLowerCase().split("test")[1] != null) {if(document.getElementsByClassName("privacy-select")[0] != null) {document.getElementsByClassName("privacy-select")[0].style.border = "solid 3px red"; document.getElementsByClassName("privacy-select")[0].parentElement.innerHTML += "<b><span style='color: red' id='added2'>Test videos should be made private or unlisted!</span></b>"}}}}}}
    if(document.getElementById("footer-links-secondary") != null) {document.getElementById("footer-links-secondary").getElementsByTagName("B")[0].style.display = "none"}
}