parent
db3506e8c7
commit
61f7984d5c
|
@ -49,13 +49,21 @@ document.addEventListener("DOMContentLoaded", function (event) {
|
|||
|
||||
// activate pref buttons selected by pref cookies or localStorage
|
||||
const in_localStorage = ["deftab", "reflinks"];
|
||||
const btn_pref = {
|
||||
"sidebar": "on",
|
||||
"deftab": "docinfo",
|
||||
"htmlconf": "html",
|
||||
"pagedeps": "reference",
|
||||
"reflinks": "refsection"
|
||||
};
|
||||
document.querySelectorAll("#pref-tab-pane .btn-check")
|
||||
.forEach(btn => {
|
||||
const id = btn.id.replace("-radio", "");
|
||||
|
||||
const val = in_localStorage.includes(btn.name) ?
|
||||
localStorage.getItem(btn.name) : cookies.get(btn.name);
|
||||
if (val == id) {
|
||||
if (val == id || ((val == undefined || val == null) &&
|
||||
btn_pref[btn.name] == id)) {
|
||||
btn.checked = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@
|
|||
</span>
|
||||
|
||||
</p>
|
||||
{% if request.COOKIES.htmlconf != 'html' and html %}
|
||||
{% if request.COOKIES.htmlconf and request.COOKIES.htmlconf != 'html' and html %}
|
||||
<div class="alert alert-info small">
|
||||
You are viewing the legacy <code><a class="text-decoration-none text-reset" href="https://github.com/ietf-tools/rfc2html">rfc2html</a></code>
|
||||
rendering of this document. Change the
|
||||
|
|
Loading…
Reference in a new issue