mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-05-13 08:57:27 +00:00
Bug 1378115 - Make about:networking keep the current section when refreshing r=jaws
MozReview-Commit-ID: CkKeFnQiP66
This commit is contained in:
parent
48a389bf2f
commit
fc93e23e03
@ -250,6 +250,13 @@ function init() {
|
||||
startLoggingButton.disabled = true;
|
||||
stopLoggingButton.disabled = true;
|
||||
}
|
||||
|
||||
if (location.hash) {
|
||||
let sectionButton = document.getElementById("category-" + location.hash.substring(1));
|
||||
if (sectionButton) {
|
||||
sectionButton.click();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function updateLogFile() {
|
||||
@ -394,7 +401,8 @@ function confirm() {
|
||||
|
||||
function show(button) {
|
||||
let current_tab = document.querySelector(".active");
|
||||
let content = document.getElementById(button.getAttribute("value"));
|
||||
let category = button.getAttribute("id").substring("category-".length);
|
||||
let content = document.getElementById(category);
|
||||
if (current_tab == content)
|
||||
return;
|
||||
current_tab.classList.remove("active");
|
||||
@ -414,6 +422,7 @@ function show(button) {
|
||||
|
||||
let title = document.getElementById("sectionTitle");
|
||||
title.textContent = button.children[0].textContent;
|
||||
location.hash = category;
|
||||
}
|
||||
|
||||
function setAutoRefreshInterval(checkBox) {
|
||||
|
@ -31,26 +31,26 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="categories">
|
||||
<div class="category" selected="true" value="http">
|
||||
<div class="category" selected="true" id="category-http">
|
||||
<span class="category-name">&aboutNetworking.HTTP;</span>
|
||||
</div>
|
||||
<div class="category" value="sockets">
|
||||
<div class="category" id="category-sockets">
|
||||
<span class="category-name">&aboutNetworking.sockets;</span>
|
||||
</div>
|
||||
<div class="category" value="dns">
|
||||
<div class="category" id="category-dns">
|
||||
<span class="category-name">&aboutNetworking.dns;</span>
|
||||
</div>
|
||||
<div class="category" value="websockets">
|
||||
<div class="category" id="category-websockets">
|
||||
<span class="category-name">&aboutNetworking.websockets;</span>
|
||||
</div>
|
||||
<hr></hr>
|
||||
<div class="category" value="dnslookuptool">
|
||||
<div class="category" id="category-dnslookuptool">
|
||||
<span class="category-name">&aboutNetworking.dnsLookup;</span>
|
||||
</div>
|
||||
<div class="category" value="logging">
|
||||
<div class="category" id="category-logging">
|
||||
<span class="category-name">&aboutNetworking.logging;</span>
|
||||
</div>
|
||||
<div class="category" value="rcwn">
|
||||
<div class="category" id="category-rcwn">
|
||||
<span class="category-name">&aboutNetworking.rcwn;</span>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user