Skip to content

Commit

Permalink
fix: use a different user agent to ensure perplexity loads on windows (
Browse files Browse the repository at this point in the history
…#239)

Co-authored-by: Marty Penner <[email protected]>
  • Loading branch information
martypenner and Marty Penner authored Oct 5, 2023
1 parent 5cb7389 commit 54ede6d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,6 @@ If you want to build from source, you will need to clone the repo and open the p
git clone https://github.com/smol-ai/GodMode.git
cd GodMode
npm install --force
# On Windows, you may also need Squirrel - these are old instructions, we would love a Windows volunteer to verify
# npm install electron-squirrel-startup

npm run start # to run in development, locally
```

Expand Down
4 changes: 4 additions & 0 deletions src/providers/perplexity-llama.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ class PerplexityLlama extends Provider {
});
}

static getUserAgent() {
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36';
}

static isEnabled() {
return window.electron.electronStore.get(`${this.webviewId}Enabled`, false);
}
Expand Down
4 changes: 4 additions & 0 deletions src/providers/perplexity.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ class Perplexity extends Provider {
// this.getWebview().setZoomLevel(this.getWebview().getZoomLevel() - 2);
}

static getUserAgent() {
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36';
}

static isEnabled() {
return window.electron.electronStore.get(`${this.webviewId}Enabled`, true);
}
Expand Down

0 comments on commit 54ede6d

Please sign in to comment.