mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-06-05 21:49:31 +02:00
Collapsible changelog implemented for previous versions
This commit is contained in:
@ -37,3 +37,13 @@ input[type=radio], label {
|
||||
display: inline-flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#history {
|
||||
cursor: pointer;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#history-release-notes {
|
||||
|
||||
}
|
||||
|
@ -29,6 +29,7 @@
|
||||
<li>Fixed: Wrong version selection of AngularUI Bootstrap (<a href="https://codeberg.org/nobody/LocalCDN/issues/50">#50</a>)</li>
|
||||
<li>Implemented: Monochrome icons (<a href="https://codeberg.org/nobody/LocalCDN/issues/52">#52</a>)</li>
|
||||
<li>Fixed: Bootstrap JS v4.4.1 (<a href="https://codeberg.org/nobody/LocalCDN/issues/54">#54</a>)</li>
|
||||
<li>Implemented: Collapsible changelog for previous versions(reported by email)</li>
|
||||
</ul>
|
||||
<div class="topic-label">
|
||||
Generate rule sets for uBlock or uMatrix
|
||||
@ -50,7 +51,8 @@
|
||||
<input id="button-copy-rule-set" type="button" value="Copy">
|
||||
</div>
|
||||
<hr/>
|
||||
<h2>History</h2>
|
||||
<div id="history"><span id="history-indicator">+</span> Previous Versions</div>
|
||||
<div id="history-release-notes" style="display: none;">
|
||||
<p class='release-date'>2020-07-05 (v2.2.12)</p>
|
||||
<ul>
|
||||
<li>Fixed bug in toggle of HTML filter (<a href="https://codeberg.org/nobody/LocalCDN/issues/33">#33</a>)</li>
|
||||
@ -357,5 +359,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -46,18 +46,33 @@ updates._openRuleSet = function({target}) {
|
||||
}
|
||||
}
|
||||
textArea.value = content.replace(/\n+$/, "");
|
||||
}
|
||||
};
|
||||
|
||||
updates._copyRuleSet = function() {
|
||||
|
||||
updates._copyRuleSet = function() {
|
||||
let textArea = document.getElementById("generated-rules");
|
||||
navigator.clipboard.writeText(textArea.value).then(function() {
|
||||
textArea.select();
|
||||
}, function() {
|
||||
alert("Rule set cannot be copied!");
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
updates._onDocumentLoaded = function () {
|
||||
updates._openHistoryReleaseNotes = function() {
|
||||
|
||||
let container = document.getElementById('history-release-notes');
|
||||
let toggle = document.getElementById('history-indicator');
|
||||
|
||||
if (container.style.display === 'none') {
|
||||
container.style.display = 'block';
|
||||
toggle.textContent = '–';
|
||||
} else {
|
||||
container.style.display = 'none';
|
||||
toggle.textContent = '+';
|
||||
}
|
||||
};
|
||||
|
||||
updates._onDocumentLoaded = function () {
|
||||
|
||||
document.getElementById('generate-ublock-rules').checked = false;
|
||||
document.getElementById('generate-umatrix-rules').checked = false;
|
||||
@ -70,7 +85,11 @@ updates._openRuleSet = function({target}) {
|
||||
for(let i = 0; i < updateElements.ruleSets.length; i++) {
|
||||
updateElements.ruleSets[i].addEventListener('change', updates._openRuleSet);
|
||||
}
|
||||
|
||||
updateElements.copyRuleSet.addEventListener('click', updates._copyRuleSet);
|
||||
};
|
||||
|
||||
document.getElementById('history').addEventListener('click', updates._openHistoryReleaseNotes);
|
||||
};
|
||||
|
||||
|
||||
document.addEventListener('DOMContentLoaded', updates._onDocumentLoaded);
|
||||
|
Reference in New Issue
Block a user