1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2025-06-05 21:49:31 +02:00

small improvements

This commit is contained in:
nobody
2025-03-28 18:43:18 +01:00
parent 8157dbcd3a
commit ee7258c518
18 changed files with 129 additions and 160 deletions

View File

@@ -19,7 +19,7 @@
* Updates
*/
let ruleGenerator = {};
const ruleGenerator = {};
/**
@@ -27,13 +27,12 @@ let ruleGenerator = {};
*/
ruleGenerator.openRuleSet = function ({target}) {
let urls, key, textArea, btnCopy, content;
urls = mappings.cdn;
key = target.getAttribute('data-ruleset');
textArea = document.getElementById('generated-rules');
btnCopy = document.getElementById('button-copy-rule-set');
content = '';
const urls = mappings.cdn;
const key = target.getAttribute('data-ruleset');
const textArea = document.getElementById('generated-rules');
const btnCopy = document.getElementById('button-copy-rule-set');
let content = '';
textArea.style.display = 'block';
btnCopy.style.display = 'block';
@@ -59,7 +58,7 @@ ruleGenerator.openRuleSet = function ({target}) {
};
ruleGenerator.copyRuleSet = function () {
let textArea = document.getElementById('generated-rules');
const textArea = document.getElementById('generated-rules');
navigator.clipboard.writeText(textArea.value).then(
function () {
textArea.select();