Skip to content

Commit

Permalink
🚧 Add stub extension
Browse files Browse the repository at this point in the history
  • Loading branch information
theRealPadster committed Oct 15, 2021
1 parent 5912245 commit 93d1e70
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Extension.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// TODO: this will be the extension in which we run the init code

// @ts-check

// NAME: Spicetify Marketplace Extension
// AUTHOR: theRealPadster, CharlieS1103
// DESCRIPTION: Companion extension for Spicetify Marketplace

/// <reference path="../spicetify-cli/globals.d.ts" />

(function MarketplaceExtension() {
// TODO: this is pulled from HidePodcasts, we'll need to adjust
const { Player, Menu, LocalStorage, Platform } = Spicetify;
const main = document.querySelector(".main-view-container__scroll-node-child");
if (!(Player && Menu && LocalStorage && Platform && main)) {
// console.log('Not ready, waiting...');
setTimeout(MarketplaceExtension, 1000);
return;
}

console.log("Loaded Marketplace extension");
})();
3 changes: 3 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@
"TabBar.js",
"Settings.js",
"ReloadModal.js"
],
"subfiles_extension": [
"Extension.js"
]
}

0 comments on commit 93d1e70

Please sign in to comment.