diff --git a/TamperTubePlus.js b/TamperTubePlus.js index cd39011..486af93 100644 --- a/TamperTubePlus.js +++ b/TamperTubePlus.js @@ -1,7 +1,7 @@ // ==UserScript== // @name TamperTubePlus // @namespace https://github.com/Sv443/TamperTubePlus -// @version 1.1.0 +// @version 1.2.0 // @description New YouTube features and general improvements // @author Sv443 // @match *://www.youtube.com/* @@ -10,9 +10,12 @@ // @icon http://sv443.net/favicons/tampertubeplusv4.ico // @run-at document-start // @require https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js +// @require https://raw.githubusercontent.com/Sv443/code/master/versions.js // @connect self // @connect * // @connect sv443.net +// @connect raw.githubusercontent.com +// @connect github.com // @downloadURL https://raw.githubusercontent.com/Sv443/TamperTubePlus/master/TamperTubePlus.js // @updateURL https://raw.githubusercontent.com/Sv443/TamperTubePlus/master/TamperTubePlus.js // ==/UserScript== @@ -20,15 +23,15 @@ (function() { 'use strict'; - /*Settings Settings Settings*/ // you can change these settings if you want to: var log_to_console = false; // log some debug info to the javascript console if set to true (default: false) var disable_polymer_design = false; // disables the new forced polymer design if set to true (default: false) - var download_hotkey = 119; // hotkey for quick video download (default key: F8 (119), 0 to disable), to look up key codes go to this website: https://zeamedia.de/helper/javascript-key-codes-char-codes.php - var search_hotkey = 115; // hotkey for quick search (default key: F4 (115), 0 to disable), to look up key codes go to this website: https://zeamedia.de/helper/javascript-key-codes-char-codes.php - var radio_hotkey = 113; + var enable_ui = true; // enable the user interface with buttons and additional information (default: true) + var download_hotkey = 119; // hotkey for quick video download (default key: F8 (119), 0 to disable), to look up key codes go to this website: https://tinyurl.com/y73b8h3z + var search_hotkey = 115; // hotkey for quick search (default key: F4 (115), 0 to disable), to look up key codes go to this website: https://tinyurl.com/y73b8h3z + var radio_hotkey = 113; // hotkey to activate the video's radio mix playlist (default key: F2 (113), 0 to disable), to look up key codes go to this website: https://tinyurl.com/y73b8h3z var search_engine = 1; // change search engine for quick search (0 to disable, 1 for google, 2 for duckduckgo, 3 for bing or 4 for yahoo) var stylesheet = 0; // switch through stylesheets for YouTube (default: 0) (0: disabled) (1: AdvancedYT - improved design and bigger video player) @@ -44,16 +47,15 @@ /*Init Init Init*/ -var ttp_version = "1.1.0"; +var curversion = "1.2.0"; var URLhost = window.location.host; var URLpath = window.location.pathname; var curURL = URLhost + "" + URLpath; var queryString = window.location.search; queryString = queryString.substring(1); - -console.log("TamperTubePlus v" + ttp_version + " by Sv443 / Sven Fehler - GitHub: https://github.com/sv443/"); - +console.log("TamperTubePlus v" + curversion + " - available version: " + ttp_version + " by Sv443 / Sven Fehler - GitHub: https://github.com/sv443/"); //ttp_version is defined through the @require línk +console.log("Debug enabled: " + log_to_console); if(log_to_console == true){console.log("--BEGIN TamperTubePlus Debug");} @@ -107,6 +109,30 @@ if(disable_polymer_design == true){ } +/*UI Elements UI Elements UI Elements*/ + +if(enable_ui == true && disable_polymer_design == true){ + document.addEventListener("DOMContentLoaded", function() { + var versiondisplayelem = document.createElement ('div'); + versiondisplayelem.innerHTML = '