diff --git a/librehunt.js b/librehunt.js index 45354b1..c73e369 100644 --- a/librehunt.js +++ b/librehunt.js @@ -1,4 +1,5 @@ // actual database for distros can be found in static/distro.db (SQLite3 database) +// TODO change to JSON distros = [['Elementary OS', 0, 0, 1, 'mac', 1, 0, 1, 1, "It's own unique Pantheon desktop", 'elementary', 'https://elementary.io/', 'https://elementary.io/get-involved#funding', @@ -74,6 +75,8 @@ function optionSelected(optionName) { return 0; } + +// generic shuffle function, used to shuffle distros when displayed in the chooser and the distro list function shuffle(a) { var j, x, i; for (i = a.length - 1; i > 0; i--) { @@ -150,15 +153,53 @@ function distro(){ // add card each time in for loop, with distro for (j = 0; j < SelectedDistros.length; j++){ current = SelectedDistros[j]; - document.getElementById("distroFound").innerHTML +='
'+current[13]+'
Old Hardware Support: '+match[current[14]]+'
Timely Updates: '+match[current[15]]+'
Lookalike: '+match[current[16]]+'
Touch Support: '+match[current[17]]+'
Extreme Security: '+match[current[18]]+'
Popularity and Support: '+match[current[19]]+'
Appearance: '+match[current[20]]+'
WebsiteContribute'+current[13]+'
'+ + 'Old Hardware Support: '+match[current[14]]+'
'+ + 'Timely Updates: '+match[current[15]]+'
'+ + 'Lookalike: '+match[current[16]]+'
'+ + 'Touch Support: '+match[current[17]]+'
'+ + 'Extreme Security: '+match[current[18]]+'
'+ + 'Popularity and Support: '+match[current[19]]+'
'+ + 'Appearance: '+match[current[20]]+'
'+ + 'Website'+ + 'Contribute'+ + '