Tabview YouTube Totara

制作信息、评论、视频和播放列表的标签

< 脚本Tabview YouTube Totara的反馈

评价:好评 - 脚本运行良好

§
发表于:2025-05-04

Lmao bro, i delete all your trash from Userscript HEAD and script loading 100x faster.
// ==UserScript==
// @name Tabview YouTube Totara
// @version 5.0.107
// @namespace https://www.youtube.com/
// @author CY Fung
// @license MIT
// @match https://www.youtube.com/*

// @description To make tabs for Info, Comments, Videos and Playlist

// @icon https://raw.githubusercontent.com/tabview-youtube/Tabview-YouTube-Totara/main/images/icon128p.png
// @supportURL https://github.com/tabview-youtube/Tabview-YouTube-Totara
// @run-at document-start
// @grant GM_getResourceText
// @grant GM.getResourceText
// @grant GM_registerMenuCommand
// @grant GM_addElement

// ==/UserScript==

§
发表于:2025-05-04

// means comments. They are completely ignored in modern browsers.

There would be no change of speed. All your time difference measurement will be just due to the random white noise of your computer execution.

100x faster is undefined for 0ms

§
发表于:2025-05-04

ChatGPT answer for your understanding:


Removing // comments in JavaScript does not improve performance at runtime because comments are not part of the code that gets executed by the JavaScript engine. Here's why:

1. Comments are ignored during parsing

When a JavaScript file is loaded:

  • The engine (e.g., V8 in Chrome) parses the code.
  • During this step, it skips over any comments (// or /* */).
  • They are not converted into bytecode or executed in any way.

So once the code is parsed, comments do not exist anymore — they're simply discarded.


2. No runtime cost

Since comments are:

  • Not stored in memory after parsing,
  • Not processed during execution,

They add zero overhead during runtime — no CPU cycles, no memory usage, nothing.


3. When removing comments can matter

There are cases where removing comments helps, but they’re not about performance:

  • Reducing file size for network transfer (important for web apps).
  • This is usually done with minification (e.g., using tools like UglifyJS, Terser).
  • Smaller files = faster loading, especially on slow connections.

However, once the code is downloaded and parsed, whether it had comments or not makes no difference to runtime performance.


Summary:

Removing // comments in JavaScript has no effect on execution performance, only potentially on file size and load times — and even that’s usually handled automatically by build tools.

§
发表于:2025-05-04
编辑于:2025-05-04

WTF?!

I remove this trash! no just comments omg.


// @exclude /^https?://\w+\.youtube\.com\/live_chat.*$/
// @exclude /^https?://\S+\.(txt|png|jpg|jpeg|gif|xml|svg|manifest|log|ini)[^\/]*$/
// @require https://cdn.jsdelivr.net/gh/cyfung1031/userscript-supports@c2b707e4977f77792042d4a5015fb188aae4772e/library/nextBrowserTick.min.js

Script no need anything and no need cookie, no need storage,.. dissabled all = insta load all fast

发表回复

登录以发表回复。