优化调整
This commit is contained in:
@@ -12,7 +12,6 @@ const DEFAULT_CONFIG = {
|
||||
interceptDownload: true,
|
||||
minSize: 0,
|
||||
excludeDomains: [],
|
||||
showNotifications: true,
|
||||
sniffEnabled: true,
|
||||
sniffTypes: ['video', 'audio', 'image', 'archive', 'torrent', 'installer'],
|
||||
sniffMaxItems: 200,
|
||||
@@ -57,7 +56,6 @@ function fillForm(config) {
|
||||
$('secret').value = config.secret || ''
|
||||
$('interceptDownload').checked = config.interceptDownload !== false
|
||||
$('sniffEnabled').checked = config.sniffEnabled !== false
|
||||
$('showNotifications').checked = config.showNotifications !== false
|
||||
$('minSize').value = config.minSize || 0
|
||||
$('sniffMinSize').value = config.sniffMinSize ?? DEFAULT_CONFIG.sniffMinSize
|
||||
$('excludeDomains').value = (config.excludeDomains || []).join(',')
|
||||
@@ -69,7 +67,6 @@ function readForm() {
|
||||
secret: $('secret').value.trim(),
|
||||
interceptDownload: $('interceptDownload').checked,
|
||||
sniffEnabled: $('sniffEnabled').checked,
|
||||
showNotifications: $('showNotifications').checked,
|
||||
minSize: parseInt($('minSize').value, 10) || 0,
|
||||
sniffMinSize: parseInt($('sniffMinSize').value, 10) || 0,
|
||||
excludeDomains: $('excludeDomains').value
|
||||
|
||||
Reference in New Issue
Block a user