local fs = require("nixio.fs")
local uci = require("luci.model.uci").cursor()
-local sys = require("luci.sys")
local util = require("luci.util")
local dump = util.ubus("network.interface", "dump", {})
.. "<a href=\"%s\" target=\"_blank\">"
.. "check the online documentation</a>", "https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md"))
-function m.on_apply(self)
- luci.sys.call("/etc/init.d/adblock reload >/dev/null 2>&1")
-end
-
-- Main adblock options
s = m:section(NamedSection, "global", "adblock")
<style type="text/css">
.runtime
{
- color: #0069d6;
+ color: #37c;
font-weight: bold;
display: inline-block;
width: 100%;
//<![CDATA[
function status_update(json)
{
- var view = document.getElementById("value_1");
- var btn1 = document.getElementById("btn1");
- var btn2 = document.getElementById("btn2");
- var input = json.data.adblock_status;
+ var view = document.getElementById("value_1");
+ var btn1 = document.getElementById("btn1");
+ var btn1_running = document.getElementById("btn1_running");
+ var btn2 = document.getElementById("btn2");
+ var btn2_running = document.getElementById("btn2_running");
+ var input = json.data.adblock_status;
view.innerHTML = input || "-";
if (input === "enabled")
btn2.value = "<%:Refresh%>";
btn2.name = "do_refresh";
btn1.disabled = true;
- btn2.disabled = false;
+ btn2.disabled = true;
return;
}
status_update(json_info)