Ver Fonte

ref: small random refactor

Sv443 há 5 dias atrás
pai
commit
d806e6971d
2 ficheiros alterados com 6 adições e 1 exclusões
  1. 5 1
      src/utils/dom.ts
  2. 1 0
      src/utils/logging.ts

+ 5 - 1
src/utils/dom.ts

@@ -6,7 +6,7 @@ import type { ResourceKey, TTPolicy } from "../types.js";
 import { siteEvents } from "../siteEvents.js";
 import { showPrompt } from "../dialogs/prompt.js";
 
-//#region vid time & vol.
+//#region vid elem
 
 /** Returns the video element selector string based on the current domain */
 export function getVideoSelector() {
@@ -22,6 +22,8 @@ export function getVideoElement() {
 
 let vidElemReady = false;
 
+//#region vid time
+
 /**
  * Returns the current video time in seconds, with the given {@linkcode precision} (2 decimal digits by default).  
  * Rounds down if the precision is set to 0. The maximum average available precision on YTM is 6.  
@@ -128,6 +130,8 @@ function ytForceShowVideoTime() {
   return true;
 }
 
+//#region vid ready
+
 /**
  * Waits for the video element to be in its readyState 4 / canplay state and returns it.  
  * Could take a very long time to resolve if the `/watch` page isn't open.  

+ 1 - 0
src/utils/logging.ts

@@ -103,6 +103,7 @@ function getErrorDialog(errName: string, args: unknown[]) {
     },
     body: `\
 ${args.length > 0 ? args.join(" ") : t("generic_error_dialog_message")}  
+  
 ${t("generic_error_dialog_open_console_note", consPrefix, packageJson.bugs.url)}`,
   });
 }