0

I used to hide end screen cards in YouTube with code in the console, but it works until reloading or closing the tab. So, how can I import JavaScript code one time for all times?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
amg
  • 85
  • 1
  • 4

1 Answers1

1

If you don't want to type in and run a script every time you load a page, you can use a userscript instead. Userscript code runs automatically when a page matching the page you want loads. For example:

// ==UserScript==
// @name             No Youtube Endcards
// @include          /^https://youtube\.com/watch
// @grant            none
// ==/UserScript==

console.log('Put your script here...');

You'll need a userscript manager like Tampermonkey. Install the addon, click on the "Create a new script" button, paste in the metadata block above, and then continue writing the JS as needed.

CertainPerformance
  • 356,069
  • 52
  • 309
  • 320