custom user-agent: rename "auto-fill" button to "Disguise as"
- Give Firefox and Chrome alternatives - Update firefox user-agent to 78
This commit is contained in:
parent
e9b1b973c1
commit
03f275e6e8
@ -71,21 +71,27 @@ form {
|
||||
|
||||
margin: 8px;
|
||||
grid-template-columns: 0fr auto 0fr;
|
||||
}
|
||||
|
||||
.form-group > * {
|
||||
margin: 8px;
|
||||
padding: 8px;
|
||||
white-space: nowrap;
|
||||
align-self: center;
|
||||
}
|
||||
&.no-expand {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.form-group > :first-child {
|
||||
justify-self: end;
|
||||
}
|
||||
> * {
|
||||
margin: 8px;
|
||||
padding: 8px;
|
||||
white-space: nowrap;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.form-group > :not(:first-child) {
|
||||
margin-left: 8px;
|
||||
> :first-child {
|
||||
justify-self: end;
|
||||
}
|
||||
|
||||
> :not(:first-child) {
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
label.form-group {
|
||||
|
@ -42,11 +42,18 @@
|
||||
<textarea name="customCSS" id="custom-css" rows="3"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="custom-user-agent">Custom UserAgent (i.e. google services)</label>
|
||||
<input type="text" name="customUserAgent" id="custom-user-agent">
|
||||
<button type="button" id="userAgentAutoFill">Auto-fill</button>
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>Disguise</legend>
|
||||
<div class="form-group">
|
||||
<label for="custom-user-agent">Custom UserAgent (i.e. google services)</label>
|
||||
<input type="text" name="customUserAgent" id="custom-user-agent">
|
||||
</div>
|
||||
|
||||
<div class="form-group no-expand">
|
||||
<button type="button" id="userAgentAutoFillFirefox">Disguise as firefox</button>
|
||||
<button type="button" id="userAgentAutoFillChrome">Disguise as chrome</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div id="icon-choice">
|
||||
<div class="form-group-header">
|
||||
|
@ -72,10 +72,16 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
ipcRenderer.send('sync-settings');
|
||||
|
||||
document.getElementById('userAgentAutoFill')?.addEventListener('click', () => {
|
||||
document.getElementById('userAgentAutoFillFirefox')?.addEventListener('click', () => {
|
||||
let customUserAgent = document.getElementById('custom-user-agent');
|
||||
if (customUserAgent) {
|
||||
(<HTMLInputElement>customUserAgent).value = 'Mozilla/5.0 (X11; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0';
|
||||
(<HTMLInputElement>customUserAgent).value = 'Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0';
|
||||
}
|
||||
});
|
||||
document.getElementById('userAgentAutoFillChrome')?.addEventListener('click', () => {
|
||||
let customUserAgent = document.getElementById('custom-user-agent');
|
||||
if (customUserAgent) {
|
||||
(<HTMLInputElement>customUserAgent).value = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36';
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user