Skip to content

Commit

Permalink
progress-table: Turn into an allow list
Browse files Browse the repository at this point in the history
[lifehackerhansol]
- Show sidebar on key-information and get-started as well
  • Loading branch information
NightScript370 authored and lifehackerhansol committed Apr 1, 2024
1 parent 45a2791 commit 96a24fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
19 changes: 8 additions & 11 deletions assets/js/_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,17 +179,7 @@ $(document).ready(function() {
/* hacks-guide change end */

/* hacks-guide change start: add progress table */
var sidebar_shown = true;
var sidebar_hidden_pages = ["404", "a9lh-to-b9s", "credits", "donations", "dumping-titles-and-game-cartridges",
"f3-(linux)", "f3xswift-(mac)", "faq", "file-extensions-(windows)",
"godmode9-usage", "h2testw-(windows)", "region-changing", "site-navigation", "troubleshooting",
"uninstall-cfw","updating-b9s", "privacy-policy", "checking-for-cfw", "restoring-updating-cfw"];

for(var i = 0; i < sidebar_hidden_pages.length; i++){
if(window.location.href.indexOf(sidebar_hidden_pages[i]) > -1) {
sidebar_shown = false;
}
}
var sidebar_shown = false;

var devices = {
"get-started-(old-3ds)": "0",
Expand Down Expand Up @@ -220,15 +210,22 @@ $(document).ready(function() {
for(var device in devices){
if(window.location.href.indexOf("/" + device) > -1) {
localStorage.setItem('device', devices[device]);
sidebar_shown = true;
}
}

for(var method in methods){
if(window.location.href.indexOf("/" + method) > -1) {
localStorage.setItem('method', methods[method]);
sidebar_shown = true;
}
}

if((window.location.href.indexOf("/" + "key-information") > -1) || (window.location.href.indexOf("/" + "get-started") > -1)) {
localStorage.setItem('method', methods[method]);
sidebar_shown = true;
}

var device, method;
if(!(method = localStorage.getItem('method'))){
sidebar_shown = false;
Expand Down
4 changes: 2 additions & 2 deletions assets/js/main.min.js

Large diffs are not rendered by default.

0 comments on commit 96a24fc

Please sign in to comment.