mirror of
https://github.com/remittor/zapret-openwrt.git
synced 2025-12-06 19:46:50 +03:00
luci: Add examples for custom.d scripts
This commit is contained in:
@@ -363,7 +363,16 @@ return view.extend({
|
|||||||
o.inputtitle = _('Edit');
|
o.inputtitle = _('Edit');
|
||||||
o.inputstyle = 'edit btn';
|
o.inputstyle = 'edit btn';
|
||||||
o.description = fn;
|
o.description = fn;
|
||||||
let desc = (num == tools.discord_num) ? _('Example') + ': <a href=%s>%s</a>'.format(tools.discord_url) : '';
|
let desc = '';
|
||||||
|
if (num == tools.discord_num) {
|
||||||
|
desc = _('Example') + ': ';
|
||||||
|
for (let k = 0; k < tools.discord_url.length; k++) {
|
||||||
|
let url = tools.discord_url[k];
|
||||||
|
if (k > 0) desc += ' <br> ';
|
||||||
|
const filename = url.substring(url.lastIndexOf("/") + 1).split("?")[0];
|
||||||
|
desc += '<a href=' + url + '>' + filename + '</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
o.onclick = () => new tools.fileEditDialog(fn, name, desc, '', 15).show();
|
o.onclick = () => new tools.fileEditDialog(fn, name, desc, '', 15).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,11 @@ return baseclass.extend({
|
|||||||
customdPrefixList : [ 10, 20, 50, 60, 90 ] ,
|
customdPrefixList : [ 10, 20, 50, 60, 90 ] ,
|
||||||
customdFileFormat : '/opt/zapret/init.d/openwrt/custom.d/%s-script.sh',
|
customdFileFormat : '/opt/zapret/init.d/openwrt/custom.d/%s-script.sh',
|
||||||
discord_num : 50,
|
discord_num : 50,
|
||||||
discord_url : 'https://github.com/bol-van/zapret/blob/4e8e3a9ed9dbeb1156db68dfaa7b353051c13797/init.d/custom.d.examples.linux/50-discord',
|
discord_url : [ 'https://github.com/bol-van/zapret/blob/4e8e3a9ed9dbeb1156db68dfaa7b353051c13797/init.d/custom.d.examples.linux/50-discord',
|
||||||
|
'https://github.com/bol-van/zapret/blob/b251ea839cc8f04c45090314ef69fce69f2c00f2/init.d/custom.d.examples.linux/50-discord-media',
|
||||||
|
'https://github.com/bol-van/zapret/blob/b251ea839cc8f04c45090314ef69fce69f2c00f2/init.d/custom.d.examples.linux/50-stun4all',
|
||||||
|
'https://github.com/bol-van/zapret/tree/master/init.d/custom.d.examples.linux'
|
||||||
|
],
|
||||||
nfqws_opt_url : 'https://github.com/remittor/zapret-openwrt/discussions/168',
|
nfqws_opt_url : 'https://github.com/remittor/zapret-openwrt/discussions/168',
|
||||||
|
|
||||||
autoHostListFN : '/opt/zapret/ipset/zapret-hosts-auto.txt',
|
autoHostListFN : '/opt/zapret/ipset/zapret-hosts-auto.txt',
|
||||||
|
|||||||
Reference in New Issue
Block a user