Greasy Fork is available in English.

讨论 » 创建请求

could someone help me out and get a script made to just remove youtubes transcript and key moments feature

§
发表于:2024-03-12

idk how to code at all im hoping this is something thats simple enough to do that someone else could do it for me else im outta luck for this

§
发表于:2024-03-12

if possible as well can you add in music stamps that are around the same area

§
发表于:2024-03-13

bumping this post hope thats aloud

§
发表于:2024-03-15

bump post

§
发表于:2024-03-15
编辑于:2024-03-15

AI is your friend

Sure, I can help you with that. Here's a simple script that you can use as a starting point. This script uses JavaScript and can be run in the browser console when you're on a YouTube video page. It hides the transcript and key moments features.

Please note that this script might not work perfectly as YouTube's website structure can change over time. Also, running scripts in your browser console can be risky, so always make sure you understand what a script does before running it.

// Get the transcript element
var transcript = document.querySelector('ytd-engagement-panel-section-list-renderer.style-scope.ytd-watch-flexy');
if (transcript) {
    // Hide the transcript element
    transcript.style.display = 'none';
}

// Get the key moments element
var keyMoments = document.querySelector('div#metadata-line');
if (keyMoments) {
    // Hide the key moments element
    keyMoments.style.display = 'none';
}

To run this script:

  1. Open a YouTube video.
  2. Right-click on the page and select "Inspect" or "Inspect Element".
  3. Click on the "Console" tab in the inspection window that opens.
  4. Copy and paste the above script into the console and press Enter.

Remember, this is a temporary solution and the changes will be gone once you refresh the page. If you want a more permanent solution, you might want to look into creating a browser extension or using a tool like Greasemonkey or Tampermonkey. These tools allow you to run custom JavaScript on specific websites. However, creating a browser extension or using these tools requires a bit more technical knowledge. If you need help with that, feel free to ask! 😊

§
发表于:2024-03-15

thank you so much i have tampermonkey already and thats why i wanted to get a script i already knew how to temp remove it in a different way you just delete the element every time for each after refresh but that gets repetitive after a bit so thank you lots i really appreciate it

§
发表于:2024-03-15

i tried to get it working in tamper monkey but its not working for some reason no matter what i do i tried using ai to help and it couldent so far ill contiuue to try tho

§
发表于:2024-03-15
编辑于:2024-03-15

idk how to put the script here like you did so maybe you can spot whats wrong like this idk
// ==UserScript==
// @name yt trascript/keymoments hide
// @namespace http://youtube.com/
// @version 1.0
// @description try to take over the world!
// @author hacker09
// @match *://*.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=YouTube.com
// @grant none
// ==/UserScript==
// Get the transcript element
var transcript = document.querySelector('ytd-engagement-panel-section-list-renderer.style-scope.ytd-watch-flexy');
if (transcript) {
// Hide the transcript element
transcript.style.display = 'none';
}

// Get the key moments element
var keyMoments = document.querySelector('div#metadata-line');
if (keyMoments) {
// Hide the key moments element
keyMoments.style.display = 'none';
}

§
发表于:2024-03-15
编辑于:2024-03-15

the original code wont even past into the inspect element console?

§
发表于:2024-03-15

sorry dont have money

§
发表于:2024-03-16

bumping again as the other poster couldent help much and just wanted money from me which i dont have and im guessing this is something that wouldent even cost anything from how simple the request is

§
发表于:2024-03-16
setInterval(()=>{
// Get the transcript element
var transcript = document.querySelector('ytd-engagement-panel-section-list-renderer.style-scope.ytd-watch-flexy');
if (transcript) {
    // Hide the transcript element
    transcript.style.display = 'none';
}

// Get the key moments element
var keyMoments = document.querySelector('div#metadata-line');
if (keyMoments) {
    // Hide the key moments element
    keyMoments.style.display = 'none';
}
}, 1000);

(or UserStyle via stylus)

§
发表于:2024-03-16

tried it in both stylus and tampermonkey in various ways and neither worked still rip
i might just leave this issue alone unless you are willing to persist

§
发表于:2024-03-16

Usually the issue is something dumb...

like not using @ document end

§
发表于:2024-03-16

try this.

// ==UserScript==
// @name yt trascript/keymoments hide
// @namespace http://youtube.com/
// @version 1.0
// @description try to take over the world!
// @author hacker09
// @match *://*.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=YouTube.com
// @grant none
// @require https://cdn.jsdelivr.net/gh/cyfung1031/userscript-supports@71da65fe0e8d803d9b5693d5c0ada685d5bc284c/library/simple-userjs.js
// ==/UserScript==

SimpleUserJS();

// Get the transcript element
SimpleUserJS.findAll('ytd-engagement-panel-section-list-renderer.style-scope.ytd-watch-flexy', (transcript) => {
    // Hide the transcript element
    transcript.style.display = 'none';
});

// Get the key moments element
SimpleUserJS.findAll('div#metadata-line', (keyMoments) => {
    // Hide the key moments element
    keyMoments.style.display = 'none';
});
Deleted user 821489
§
发表于:2024-03-17

you're making fun of him? what js?

/* ==UserStyle==
@name Youtube hide FOR YOU suggestion
@namespace yt-hide
@version 0.1
@description 
@preprocessor default
==/UserStyle== */

@-moz-document domain("youtube.com") {
/*music*/
#description #extra-content,
/*transcript */
#description ytd-engagement-panel-section-list-renderer.style-scope.ytd-watch-flexy,
/*key moments*/
#description #metadata-line {
  display:none;
 }
}

发表回复

登录以发表回复。