YouTube Auto Insert User Name Into Comment Reply Box

Automatically insert the user name whom you're replying to into the comment reply's edit box.

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 or Violentmonkey 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         YouTube Auto Insert User Name Into Comment Reply Box
// @namespace    YouTubeAutoInsertUserNameIntoCommentReplyBox
// @version      1.0.1
// @description  Automatically insert the user name whom you're replying to into the comment reply's edit box.
// @author       jcunews
// @include      https://www.youtube.com/*
// @grant        none
// ==/UserScript==

addEventListener("click", function(ev, ele, author) {
  ele = ev.target;
  if (!ele.classList.contains("comment-renderer-reply")) return;
  ele = ele.parentNode.parentNode;
  author = ele.parentNode.querySelector(".comment-author-text");
  if (!author || !(ele = ele.querySelector(".comment-simplebox-text"))) return;
  ele.innerHTML = "+" + author.outerHTML + ": ";
});