|
|
@ -3,10 +3,12 @@ function restore_options() { |
|
|
|
console.log("Loading Settings", result) |
|
|
|
var quads = document.getElementsByClassName("quadrant") |
|
|
|
var style = document.createElement("style") |
|
|
|
if (!(typeof result === 'undefined')) { |
|
|
|
if (!(typeof result.links)) result.links = [] |
|
|
|
if (!(typeof result.colors)) result.colors = [] |
|
|
|
if (!(typeof result.mode)) result.mode = "light" |
|
|
|
if (!(typeof result === "undefined")) { |
|
|
|
if (!(typeof result.links === "object")) result.links = [] |
|
|
|
if (!Array.isArray(result.links)) result.links = [] |
|
|
|
if (!(typeof result.colors === "object")) result.colors = [] |
|
|
|
if (!Array.isArray(result.colors)) result.colors = [] |
|
|
|
if (!(typeof result.mode) === "string") result.mode = "light" |
|
|
|
for (i = 0; i < quads.length; i++) { |
|
|
|
if (i < result.links.length) { |
|
|
|
var link = result.links[i] |
|
|
|