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;
|
margin: 8px;
|
||||||
grid-template-columns: 0fr auto 0fr;
|
grid-template-columns: 0fr auto 0fr;
|
||||||
}
|
|
||||||
|
|
||||||
.form-group > * {
|
&.no-expand {
|
||||||
margin: 8px;
|
display: flex;
|
||||||
padding: 8px;
|
flex-direction: row;
|
||||||
white-space: nowrap;
|
justify-content: center;
|
||||||
align-self: center;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.form-group > :first-child {
|
> * {
|
||||||
justify-self: end;
|
margin: 8px;
|
||||||
}
|
padding: 8px;
|
||||||
|
white-space: nowrap;
|
||||||
|
align-self: center;
|
||||||
|
}
|
||||||
|
|
||||||
.form-group > :not(:first-child) {
|
> :first-child {
|
||||||
margin-left: 8px;
|
justify-self: end;
|
||||||
|
}
|
||||||
|
|
||||||
|
> :not(:first-child) {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
label.form-group {
|
label.form-group {
|
||||||
|
@ -42,11 +42,18 @@
|
|||||||
<textarea name="customCSS" id="custom-css" rows="3"></textarea>
|
<textarea name="customCSS" id="custom-css" rows="3"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<fieldset>
|
||||||
<label for="custom-user-agent">Custom UserAgent (i.e. google services)</label>
|
<legend>Disguise</legend>
|
||||||
<input type="text" name="customUserAgent" id="custom-user-agent">
|
<div class="form-group">
|
||||||
<button type="button" id="userAgentAutoFill">Auto-fill</button>
|
<label for="custom-user-agent">Custom UserAgent (i.e. google services)</label>
|
||||||
</div>
|
<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 id="icon-choice">
|
||||||
<div class="form-group-header">
|
<div class="form-group-header">
|
||||||
|
@ -72,10 +72,16 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
|
|
||||||
ipcRenderer.send('sync-settings');
|
ipcRenderer.send('sync-settings');
|
||||||
|
|
||||||
document.getElementById('userAgentAutoFill')?.addEventListener('click', () => {
|
document.getElementById('userAgentAutoFillFirefox')?.addEventListener('click', () => {
|
||||||
let customUserAgent = document.getElementById('custom-user-agent');
|
let customUserAgent = document.getElementById('custom-user-agent');
|
||||||
if (customUserAgent) {
|
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