Sergey Schmidt - Labels YT

Hides instuctions, chooses off topic.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Sergey Schmidt - Labels YT
// @namespace    http://kadauchi.com/
// @version      1.4.1
// @description  Hides instuctions, chooses off topic.
// @author       Kadauchi
// @icon         http://kadauchi.com/avatar.jpg
// @include      https://s3.amazonaws.com/*
// @grant        GM_log
// @require      https://code.jquery.com/jquery-2.1.4.min.js
// ==/UserScript==

$(function(){
    var hitcheck = $("a[class='jumper'][data-target='#desc-off-topic']");
    if (hitcheck.length){ 
        console.log("Hit Check for [Sergey Schmidt - Labels YT]: Success!!!");

        $("#instructions").before('<button id="toggle" type="button"><span>Show Instructions</span></button>');
        $("#toggle").click(function() {
            $("#instructions, #sample-task, #delete-history").toggle();
            $("#toggle").text() == "Show Instructions" ? str = "Hide Instructions" : str = "Show Instructions";
            $("#toggle span").html(str);
        });  

        $("#instructions, #sample-task, #delete-history").hide();
        $("input[value='OFF_TOPIC']").click();
        $("input[value='OFF_TOPIC']:visible").eq(0).focus();

        $(window).on("beforeunload", function(){
            var topics = $("input[value='OFF_TOPIC']:visible").length;
            var checked = $("input:radio:checked:visible").length;
            if (checked !== topics){
                return "You are missing a checked radio.";
            }
        });
    }
    else {
        console.log("Hit Check for [Sergey Schmidt - Labels YT]: Fail!!!");
    }
});