diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..071472b Binary files /dev/null and b/.DS_Store differ diff --git a/.gitignore b/.gitignore index 3c25e1e..ae183f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ node_modules/ dist/ *.log +config.json + \ No newline at end of file diff --git a/config.example.json b/config.example.json new file mode 100644 index 0000000..279ae4b --- /dev/null +++ b/config.example.json @@ -0,0 +1,10 @@ +{ + "accessToken": "", + "clientId": "", + "userId": "", + "userName": "", + "port": "", + "commitDelayMs": "", + "autoComplete": "", + "clientSecret": "" +} \ No newline at end of file diff --git a/extensions/.DS_Store b/extensions/.DS_Store new file mode 100644 index 0000000..dfec139 Binary files /dev/null and b/extensions/.DS_Store differ diff --git a/extensions/MALSync b/extensions/MALSync new file mode 160000 index 0000000..23ee348 --- /dev/null +++ b/extensions/MALSync @@ -0,0 +1 @@ +Subproject commit 23ee348e8ed391f47f6bbb6ed72b546cefb5d032 diff --git a/src/main.js b/src/main.js index 4355274..011f61c 100644 --- a/src/main.js +++ b/src/main.js @@ -3,20 +3,14 @@ const path = require("path"); const fs = require("fs"); const os = require("os"); -// Path to the MAL-Sync extension we built earlier from the real MALSync -// source (github.com/MALSync/MALSync). Electron can load unpacked Chrome -// extensions directly via session.loadExtension, so the SAME extension -// code that runs in Brave also runs here, inside our own app's browser -// tab - MAL-Sync itself is unmodified, just hosted in our own window -// instead of a general-purpose browser. +// Path to the MAL-Sync extension +// source (github.com/MALSync/MALSync). Electron load unpacked Chrome +// extensions directly via session.loadExtension. const MALSYNC_EXTENSION_PATH = path.join( require("os").homedir(), - "projects/MALSync/dist/webextension" + "../extensions/MALSync/dist/webextension" ); -// Shares the same config file as our existing anilist-tracker hub server -// (~/.anilist-tracker/config.json), so this app reads the SAME AniList -// access token you already logged in with - no separate login needed. const CONFIG_PATH = path.join(os.homedir(), ".anilist-tracker", "config.json"); function loadHubConfig() {