Added featured button if weekly is disabled

why not
This commit is contained in:
Colon 2021-12-07 14:22:17 -05:00
parent c6683bd658
commit 571baaf0d8
2 changed files with 7 additions and 3 deletions

View file

@ -53,8 +53,8 @@
<tr class="menuButtonList">
<td><a tabindex="1" href="./search/*?type=saved"><img class="menubutton menu-saved" src="../assets/category-saved.png"></a></td>
<td><a tabindex="1" href="./daily"><img class="menubutton menu-daily" src="../assets/category-daily.png"></a></td>
<td id="menu_weekly" style="display: block;"><a tabindex="1" href="./weekly"><img class="menubutton menu-weekly" src="../assets/category-weekly.png"></a></td>
<td id="menu_featured" style="display: none;"><a tabindex="1" href="./search/*?type=featured"><img class="menubutton menu-featured" src="../assets/category-featured.png"></a></td>
<td style="display: block" id="menu_weekly"><a tabindex="1" href="./weekly"><img class="menubutton menu-weekly" src="../assets/category-weekly.png"></a></td>
<td style="display: none" id="menu_featured"><a tabindex="1" href="./search/*?type=featured"><img class="menubutton menu-featured" src="../assets/category-featured.png"></a></td>
<td><a tabindex="1" href="./gauntlets"><img class="menubutton menu-gauntlets" src="../assets/category-gauntlets.png"></a></td>
</tr>
<tr class="menuButtonList">

View file

@ -252,7 +252,11 @@ app.get("/", function(req, res) {
if (req.server.downloadsDisabled && process.platform == "linux") {
downloadDisabled.forEach(x => { html = html.replace(`menu-${x}`, 'menuDisabled') })
html = html.replace('id="dl" style="display: none', 'style="display: block')
.replace('No active <span id="noLevel">daily</span> level!', '[Blocked by RobTop]')
.replace('No active < span id="noLevel">daily</span> level!', '[Blocked by RobTop]')
}
if (html.includes('menuDisabled" src="../assets/category-weekly')) { // if weekly disabled, replace with featured
html = html.replace('block" id="menu_weekly', 'none" id="menu_weekly')
.replace('none" id="menu_featured', 'block" id="menu_featured')
}
return res.status(200).send(html)
})