diff --git a/static/index.html b/static/index.html
index eb0d56f..247a658 100644
--- a/static/index.html
+++ b/static/index.html
@@ -53,15 +53,8 @@
apologies for any inconvinience caused to you.
Quick Links
-
-
-
-
-
-
-
-
-
+
+
diff --git a/static/js/find-code.js b/static/js/find-code.js
index 85969a1..fe3e0f6 100644
--- a/static/js/find-code.js
+++ b/static/js/find-code.js
@@ -1,4 +1,4 @@
-async function fetchEntry(){
+async function fetchEntry(){ // This can be condensed
showLoading();
var name = document.getElementById("name")
var crs = document.getElementById("3alpha")
diff --git a/static/js/index.js b/static/js/index.js
index 4e7bfbe..4fe9b9d 100644
--- a/static/js/index.js
+++ b/static/js/index.js
@@ -12,4 +12,22 @@ async function sidebarClose() {
async function gotoBoard(station){
window.location.assign(`${window.location.origin}/board.html?stn=${station}`)
+}
+
+async function setQls(){
+ var qlOpt = JSON.parse(localStorage.getItem("qlOpt"))
+ var qlDef = ["bri","lwh","srd","mtp","rda","cfn","sml","shh","pri","avn"]
+ if (qlOpt) {
+ for(var i = 0; i < qlOpt.length; i++) {
+ console.log(`Button: ${qlOpt[i]}`)
+ var btn = ``
+ document.getElementById("quick_links").insertAdjacentHTML("beforeend", btn) // Append btn
+ }
+ } else {
+ for(var i = 0; i < qlDef.length; i++) {
+ console.log(`Button: ${qlDef[i]}`)
+ var btn = ``
+ document.getElementById("quick_links").insertAdjacentHTML("beforeend", btn) // Append btn
+ }
+ }
}
\ No newline at end of file
diff --git a/static/js/settings.js b/static/js/settings.js
index e69de29..32edc8f 100644
--- a/static/js/settings.js
+++ b/static/js/settings.js
@@ -0,0 +1,52 @@
+// Init:
+const ql = ["ql0","ql1","ql2","ql3","ql4","ql5","ql6","ql7","ql8","ql9"]
+checkStorageSupport();
+
+async function checkStorageSupport(){
+ if (window.localStorage){
+ localStorage.setItem("support-check","8441");
+ if (localStorage.getItem("support-check")=="8441"){
+ console.log("Local Storage supported.")
+ localStorage.removeItem("support-check")
+ } else if (localStorage.getItem("support-check" != "8441")){
+ console.log("Error fetching test value.")
+ }
+ } else {
+ console.log("Local Storage is not supported")
+ window.alert("Settings cannot be saved on your device, try updating your browser.")
+ }
+}
+
+async function getQl(){
+ var qlOpt = JSON.parse(localStorage.getItem("qlOpt"))
+ if (qlOpt){
+ var i = 0
+ while (i < 10) {
+ if (qlOpt[i] != 'undefined') {
+ console.log(`Setting box ql${i} to ${qlOpt[i]}`)
+ document.getElementById(`ql${i}`).value = qlOpt[i]
+ i +=1
+ }
+ }
+ }
+}
+
+async function setQl(){
+ var qlSet = []
+ for (i in ql) {
+ console.log(`Try to get value of 'ql${i}'`)
+ var opt = document.getElementById(`ql${i}`).value
+ console.log(`Found value: ${opt}`)
+ if (opt != ""){
+ qlSet.push(opt)
+ }
+ qlSet.sort()
+ }
+ console.log(qlSet)
+ localStorage.setItem("qlOpt", JSON.stringify(qlSet))
+}
+
+async function clearQl(){
+ localStorage.removeItem("qlOpt")
+ getQl()
+}
\ No newline at end of file
diff --git a/static/settings.html b/static/settings.html
index fb7e8c4..57248e3 100644
--- a/static/settings.html
+++ b/static/settings.html
@@ -13,7 +13,7 @@
OwlBoard - Settings
-
+
@@ -32,19 +32,21 @@
Any settings you apply will only apply to the device you are using now.
Settings are not yet fully implemented, some options won't apply properly yet.
-
+
+
+ Enter one CRS/3ALPHA code per box
+
+
+
+
+
+
+
+
+
+
+
+
+