Last active
January 19, 2017 20:49
-
-
Save IMcPwn/c3a2da47ba3670254406d499dbf54830 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Hide YouTube Comments | |
// @namespace https://imcpwn.com | |
// @description Hide the YouTube Comments with no option to re-enable. | |
// @version 1.0.0 | |
// @author Carleton Stuberg | |
// @copyright 2016+, Carleton Stuberg | |
// @license MIT; http://opensource.org/licenses/MIT | |
// @include http://www.youtube.com/watch* | |
// @include https://www.youtube.com/watch* | |
// @include http://youtube.com/watch* | |
// @include https://youtube.com/watch* | |
// @run-at document-end | |
// @grant none | |
// ==/UserScript== | |
(function () { | |
var comments = document.getElementById("watch-discussion"); | |
var toggleLoc = document.getElementById("watch8-secondary-actions"); | |
var toggleDiv = document.createElement("div"); | |
toggleDiv.style.textAlign = "center"; | |
toggleDiv.innerHTML = "<button id='toggleBtn' class='yt-uix-button yt-uix-button-default' disabled> Comments are disabled </button>"; | |
comments.parentNode.insertBefore(toggleDiv, comments); | |
comments.style.display = "none"; | |
var toggleBtn = document.getElementById("toggleBtn"); | |
}) (); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment