implement favorite hotkeys

This commit is contained in:
zefie
2025-07-31 11:23:57 -04:00
parent 4c527cba34
commit 6197fa99a3
3 changed files with 11 additions and 4 deletions

View File

@@ -12,7 +12,13 @@ Location: wtv-favorite:/favorite`
var folder_array = session_data.favstore.getFolders();
var url = request_headers.request;
var key = url.split('?')[1]
headers = `400 You have not assigned a favorite to ${key}`
var scfav = session_data.favstore.getShortcutKey(key);
if (!scfav.id || scfav.id == "none") {
headers = `400 You have not assigned a favorite to ${key}`
} else {
var fav = session_data.favstore.getFavorite(scfav.folder, scfav.id);
headers = `300 OK
Content-Type: text/html
Location: ${fav.url}`
}
}