Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use a different user agent to ensure perplexity loads on windows #239

Merged
merged 2 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading