aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSowgro <69283684+Sowgro@users.noreply.github.com>2023-09-11 16:03:52 -0400
committerGitHub <noreply@github.com>2023-09-11 16:03:52 -0400
commita2cf4228528a08968f80188a2968307aa008902f (patch)
tree0bb240cf84e7622de863d5a245a97a6b5074581c
parent781a640245891e59276549d1864d156035b56d8e (diff)
downloadbetterLibrary-a2cf4228528a08968f80188a2968307aa008902f.tar.gz
betterLibrary-a2cf4228528a08968f80188a2968307aa008902f.tar.bz2
betterLibrary-a2cf4228528a08968f80188a2968307aa008902f.zip
First Commit
-rw-r--r--README.md2
-rw-r--r--app/betterlibrary.js21
-rw-r--r--app/index.js57
-rw-r--r--app/manifest.json6
-rw-r--r--app/style.css3
-rw-r--r--manifest.json11
-rw-r--r--preview.pngbin0 -> 479759 bytes
7 files changed, 99 insertions, 1 deletions
diff --git a/README.md b/README.md
index dd8ba55..e85c8c8 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,2 @@
# betterLibrary
-A Spicetify app which allows the library to be opened in the center pane, similar to how you could before the redesign
+A Spicetify app which allows the library to be opened in the center pane, similar to how you could before the redesign \ No newline at end of file
diff --git a/app/betterlibrary.js b/app/betterlibrary.js
new file mode 100644
index 0000000..9649bea
--- /dev/null
+++ b/app/betterlibrary.js
@@ -0,0 +1,21 @@
+var a;
+
+function betterlibrary() {
+ if (a == undefined)
+ try {
+ a = document.getElementsByClassName("main-yourLibraryX-libraryContainer")[0];
+ console.log("setting a");
+ } catch (error) {
+
+ }
+ try {
+ setTimeout(() => {
+ document.getElementsByClassName("betterlibheader")[0].prepend(a);
+ // document.getElementsByClassName("main-yourLibraryX-entryPoints")[0].appendChild(a);
+ }, 100);
+ console.log("did not catch");
+ } catch (error) {
+ console.log("catch!!");
+ console.error(error);
+ }
+} \ No newline at end of file
diff --git a/app/index.js b/app/index.js
new file mode 100644
index 0000000..b6f1a9b
--- /dev/null
+++ b/app/index.js
@@ -0,0 +1,57 @@
+// Grab any variables you need
+const react = Spicetify.React;
+const reactDOM = Spicetify.ReactDOM;
+const {
+ URI,
+ React: { useState, useEffect, useCallback },
+ Platform: { History },
+} = Spicetify;
+
+// The main custom app render function. The component returned is what is rendered in Spotify.
+function render() {
+ betterlibrary();
+ return react.createElement(Grid, { title: "loading..." });
+}
+
+// Our main component
+class Grid extends react.Component {
+ constructor(props) {
+ super(props);
+ Object.assign(this, props);
+ this.state = {
+ foo: "bar",
+ data: "etc"
+ };
+ // console.log("test");
+ }
+
+ render() {
+ return react.createElement("section", {
+ className: "contentSpacing",
+ },
+ react.createElement("div", {
+ className: "betterlibheader",
+ }, react.createElement("h1", null, this.props.title),
+ ),
+ );
+ // ), react.createElement("div", {
+ // id: "marketplace-grid",
+ // className: "main-gridContainer-gridContainer",
+ // "data-tab": CONFIG.activeTab,
+ // style: {
+ // "--minimumColumnWidth": "180px",
+ // },
+ // }, [...cardList]),
+ // react.createElement("footer", {
+ // style: {
+ // margin: "auto",
+ // textAlign: "center",
+ // },
+ // }, !this.state.endOfList && (this.state.rest ? react.createElement(LoadMoreIcon, { onClick: this.loadMore.bind(this) }) : react.createElement(LoadingIcon)),
+ // ), react.createElement(TopBarContent, {
+ // switchCallback: this.switchTo.bind(this),
+ // links: CONFIG.tabs,
+ // activeLink: CONFIG.activeTab,
+ // });
+ }
+} \ No newline at end of file
diff --git a/app/manifest.json b/app/manifest.json
new file mode 100644
index 0000000..2431a42
--- /dev/null
+++ b/app/manifest.json
@@ -0,0 +1,6 @@
+{
+ "name": "betterlibrary",
+ "icon": "<svg role=\"img\" height=\"24\" width=\"24\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" data-encore-id=\"icon\" class=\"Svg-sc-ytk21e-0 Svg-img-24-icon\"><path d=\"M14.5 2.134a1 1 0 0 1 1 0l6 3.464a1 1 0 0 1 .5.866V21a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1V3a1 1 0 0 1 .5-.866zM16 4.732V20h4V7.041l-4-2.309zM3 22a1 1 0 0 1-1-1V3a1 1 0 0 1 2 0v18a1 1 0 0 1-1 1zm6 0a1 1 0 0 1-1-1V3a1 1 0 0 1 2 0v18a1 1 0 0 1-1 1z\"></path></svg>",
+ "active-icon": "<svg role=\"img\" height=\"24\" width=\"24\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" data-encore-id=\"icon\" class=\"Svg-sc-ytk21e-0 Svg-img-24-icon\"><path d=\"M3 22a1 1 0 0 1-1-1V3a1 1 0 0 1 2 0v18a1 1 0 0 1-1 1zM15.5 2.134A1 1 0 0 0 14 3v18a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V6.464a1 1 0 0 0-.5-.866l-6-3.464zM9 2a1 1 0 0 0-1 1v18a1 1 0 1 0 2 0V3a1 1 0 0 0-1-1z\"></path></svg>",
+ "subfiles_extension": ["betterlibrary.js"]
+} \ No newline at end of file
diff --git a/app/style.css b/app/style.css
new file mode 100644
index 0000000..d6d155b
--- /dev/null
+++ b/app/style.css
@@ -0,0 +1,3 @@
+.betterlibheader{
+ margin: 0 calc(-.5 * var(--content-spacing));
+} \ No newline at end of file
diff --git a/manifest.json b/manifest.json
new file mode 100644
index 0000000..98ab748
--- /dev/null
+++ b/manifest.json
@@ -0,0 +1,11 @@
+{
+ "name": "betterLibrary",
+ "description": "Allows the library to be opened in the center pane, similar to how you could before the redesign",
+ "preview": "preview.png",
+ "readme": "README.md",
+ "branch": "main",
+ "authors": [
+ { "name": "sowgro", "url": "https://sowgro.net/" }
+ ],
+ "tags": ["library"]
+} \ No newline at end of file
diff --git a/preview.png b/preview.png
new file mode 100644
index 0000000..b29feaf
--- /dev/null
+++ b/preview.png
Binary files differ