Commit 8d72f7a1 authored by seren akari's avatar seren akari

pretend to be chromium

parent 143b9db1
{
"name": "navi",
"version": "0.2.0-alpha",
"version": "0.2.1-alpha",
"description": "an electron-based web browser",
"private": true,
"main": "index.js",
......
......@@ -257,7 +257,10 @@ export class Tab implements WrappedElement {
async navigateTo(input: string) {
const uri = url.parse(input);
if (uri.protocol == null) input = `http://${input}`;
try { await this.view.webContents.loadURL(input); } catch (e) { }
try {
await this.view.webContents.loadURL(input, { userAgent: remote.app.userAgentFallback.replace(/(Navi|Navi \(testing\)|Electron)\/.*?( |$)/g, '') });
//await this.view.webContents.loadURL(input);
} catch (e) { console.warn('failed to load', e); }
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment