Ver código fonte

ref: smol stuffs

Sv443 1 ano atrás
pai
commit
fe97d94249
2 arquivos alterados com 9 adições e 9 exclusões
  1. 8 8
      src/index.ts
  2. 1 1
      src/types.ts

+ 8 - 8
src/index.ts

@@ -83,10 +83,17 @@ async function onDomLoad() {
 
   initSelectorExistsCheck();
 
-  log(`Initializing features for domain '${domain}'`);
+  log(`Initializing features for domain "${domain}"...`);
 
   try {
     if(domain === "ytm") {
+      try {
+        addMenu(); // TODO(v1.1): remove
+      }
+      catch(err) {
+        error("Couldn't add menu:", err);
+      }
+
       initSiteEvents();
 
       onSelectorExists("tp-yt-iron-dropdown #contentWrapper ytd-multi-page-menu-renderer #container.menu-container", addConfigMenuOption);
@@ -118,13 +125,6 @@ async function onDomLoad() {
     if(["ytm", "yt"].includes(domain)) {
       if(features.switchBetweenSites)
         initSiteSwitch(domain);
-
-      try {
-        addMenu(); // TODO(v1.1): remove
-      }
-      catch(err) {
-        error("Couldn't add menu:", err);
-      }
     }
   }
   catch(err) {

+ 1 - 1
src/types.ts

@@ -26,7 +26,7 @@ export interface FeatureConfig {
   };
   /** Whether to completely disable the popup that sometimes appears before leaving the site */
   disableBeforeUnloadPopup: boolean;
-  /** TODO: Make it so middle clicking a song to open it in a new tab (through thumbnail and song title) is easier */
+  /** Make it so middle clicking a song to open it in a new tab (through thumbnail and song title) is easier */
   anchorImprovements: boolean;
 
   //#SECTION layout