diff options
Diffstat (limited to 'applications/luci-app-adblock/htdocs')
5 files changed, 12 insertions, 22 deletions
diff --git a/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/blacklist.js b/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/blacklist.js index b0c8b5aafc..69c25d6dd4 100644 --- a/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/blacklist.js +++ b/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/blacklist.js @@ -1,9 +1,8 @@ 'use strict'; -'require view'; 'require fs'; 'require ui'; -return view.extend({ +return L.view.extend({ load: function() { return L.resolveDefault(fs.read_direct('/etc/adblock/adblock.blacklist'), ''); }, @@ -25,6 +24,7 @@ return view.extend({ E('p', {}, E('textarea', { 'style': 'width: 100% !important; padding: 5px; font-family: monospace', + 'spellcheck': 'false', 'wrap': 'off', 'rows': 25 }, [ blacklist != null ? blacklist : '' ]) diff --git a/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/dnsreport.js b/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/dnsreport.js index a042c35169..58a6dbe1a9 100644 --- a/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/dnsreport.js +++ b/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/dnsreport.js @@ -1,5 +1,4 @@ 'use strict'; -'require view'; 'require fs'; 'require ui'; @@ -187,7 +186,7 @@ function handleAction(ev) { } } -return view.extend({ +return L.view.extend({ load: function() { return L.resolveDefault(fs.exec_direct('/etc/init.d/adblock', ['report', '+', '50', 'false', 'json']),''); }, diff --git a/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/logread.js b/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/logread.js index 4dc2a2e533..64f23b14c8 100644 --- a/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/logread.js +++ b/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/logread.js @@ -1,9 +1,7 @@ 'use strict'; -'require view'; -'require poll'; 'require fs'; -return view.extend({ +return L.view.extend({ load: function() { return Promise.all([ L.resolveDefault(fs.stat('/sbin/logread'), null), @@ -12,7 +10,7 @@ return view.extend({ }, render: function(stat) { var logger = stat[0] ? stat[0].path : stat[1] ? stat[1].path : null; - poll.add(function() { + L.Poll.add(function() { return L.resolveDefault(fs.exec_direct(logger, ['-e', 'adblock-'])).then(function(res) { var log = document.getElementById("logfile"); if (res) { diff --git a/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/overview.js b/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/overview.js index 2ebab91dd5..4c20c48ec3 100644 --- a/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/overview.js +++ b/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/overview.js @@ -1,6 +1,4 @@ 'use strict'; -'require view'; -'require poll'; 'require fs'; 'require ui'; 'require uci'; @@ -100,7 +98,7 @@ async function handleAction(ev) { } } - poll.start(); + L.Poll.start(); fs.exec_direct('/etc/init.d/adblock', [ev]) var running = 1; while (running === 1) { @@ -111,10 +109,10 @@ async function handleAction(ev) { } }) } - poll.stop(); + L.Poll.stop(); } -return view.extend({ +return L.view.extend({ load: function() { return Promise.all([ L.resolveDefault(fs.exec_direct('/etc/init.d/adblock', ['list']), {}), @@ -131,7 +129,7 @@ return view.extend({ /* poll runtime information */ - pollData: poll.add(function() { + pollData: L.Poll.add(function() { return L.resolveDefault(fs.read_direct('/tmp/adb_runtime.json'), 'null').then(function(res) { var info = JSON.parse(res); var status = document.getElementById('status'); @@ -144,7 +142,7 @@ return view.extend({ } else { if (status.classList.contains("spinning")) { status.classList.remove("spinning"); - poll.stop(); + L.Poll.stop(); } } if (status.textContent.substr(0,6) === 'paused' && document.getElementById('btn_suspend')) { @@ -364,11 +362,6 @@ return view.extend({ o.rmempty = false; o = s.taboption('additional', form.Value, 'adb_fetchparm', _('Download Parameters'), _('Special config options for the selected download utility.')) - o.value('--timeout=20 -O'); - o.value('--connect-timeout 20 --silent --show-error --location -o'); - o.value('--no-cache --no-cookies --max-redirect=0 --timeout=20 -O'); - o.value('--timeout=20 --allow-overwrite=true --auto-file-renaming=false --check-certificate=true --dir=" " -o'); - o.default = false; o.rmempty = true; /* diff --git a/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/whitelist.js b/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/whitelist.js index 5d310f1dbe..6fc14becad 100644 --- a/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/whitelist.js +++ b/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/whitelist.js @@ -1,9 +1,8 @@ 'use strict'; -'require view'; 'require fs'; 'require ui'; -return view.extend({ +return L.view.extend({ load: function() { return L.resolveDefault(fs.read_direct('/etc/adblock/adblock.whitelist'), ''); }, @@ -25,6 +24,7 @@ return view.extend({ E('p', {}, E('textarea', { 'style': 'width: 100% !important; padding: 5px; font-family: monospace', + 'spellcheck': 'false', 'wrap': 'off', 'rows': 25 }, [ whitelist != null ? whitelist : '' ]) |