diff --git a/TODO b/TODO index 36f93a5..2f6912a 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,7 @@ -* During setup, make period time and scores input fields -* Display clickable timing presets during setup -* A popup logo browser would be nice -* use chrome.mediaGalleries to load logos +* User-Provided Logos + * Default to Kitty + * Add Color Picker + * chrome.fileSystem.retainEntry + * onload handler: check if width=0 and height=0 + * use chrome.power to keep the display on diff --git a/flag-ca.html b/flag-ca.html deleted file mode 100644 index 1cd69b3..0000000 --- a/flag-ca.html +++ /dev/null @@ -1,4 +0,0 @@ - -flag -Flag - diff --git a/flag-mx.html b/flag-mx.html deleted file mode 100644 index e76fd9a..0000000 --- a/flag-mx.html +++ /dev/null @@ -1,4 +0,0 @@ - -flag -Flag - diff --git a/flag-us.html b/flag-us.html deleted file mode 100644 index 59eb521..0000000 --- a/flag-us.html +++ /dev/null @@ -1,4 +0,0 @@ - -flag -Flag - diff --git a/logos/4crg.png b/logos/4crg.png deleted file mode 100644 index aeac4dc..0000000 Binary files a/logos/4crg.png and /dev/null differ diff --git a/logos/animas.png b/logos/animas.png deleted file mode 100644 index 1bf1519..0000000 Binary files a/logos/animas.png and /dev/null differ diff --git a/logos/aurora.png b/logos/aurora.png deleted file mode 100644 index dd3d8cf..0000000 Binary files a/logos/aurora.png and /dev/null differ diff --git a/logos/bbdd.png b/logos/bbdd.png deleted file mode 100644 index f77386c..0000000 Binary files a/logos/bbdd.png and /dev/null differ diff --git a/logos/bd-betties.png b/logos/bd-betties.png deleted file mode 100644 index 9e3ff1e..0000000 Binary files a/logos/bd-betties.png and /dev/null differ diff --git a/logos/black.png b/logos/black.png deleted file mode 100644 index 8d31ed7..0000000 Binary files a/logos/black.png and /dev/null differ diff --git a/logos/blue.png b/logos/blue.png deleted file mode 100644 index 849928f..0000000 Binary files a/logos/blue.png and /dev/null differ diff --git a/logos/bombs.png b/logos/bombs.png deleted file mode 100644 index 7713709..0000000 Binary files a/logos/bombs.png and /dev/null differ diff --git a/logos/brawlers.png b/logos/brawlers.png deleted file mode 100644 index ca47daa..0000000 Binary files a/logos/brawlers.png and /dev/null differ diff --git a/logos/bwbs.png b/logos/bwbs.png deleted file mode 100644 index 3683a05..0000000 Binary files a/logos/bwbs.png and /dev/null differ diff --git a/logos/campers.png b/logos/campers.png deleted file mode 100644 index f930931..0000000 Binary files a/logos/campers.png and /dev/null differ diff --git a/logos/cherries.png b/logos/cherries.png deleted file mode 100644 index 45e1648..0000000 Binary files a/logos/cherries.png and /dev/null differ diff --git a/logos/choicecity.png b/logos/choicecity.png deleted file mode 100644 index f9e205f..0000000 Binary files a/logos/choicecity.png and /dev/null differ diff --git a/logos/chupas.png b/logos/chupas.png deleted file mode 100644 index 54f32b1..0000000 Binary files a/logos/chupas.png and /dev/null differ diff --git a/logos/dcd.png b/logos/dcd.png deleted file mode 100644 index a3506de..0000000 Binary files a/logos/dcd.png and /dev/null differ diff --git a/logos/dia.png b/logos/dia.png deleted file mode 100644 index d574084..0000000 Binary files a/logos/dia.png and /dev/null differ diff --git a/logos/doomsdames.png b/logos/doomsdames.png deleted file mode 100644 index d5eddb3..0000000 Binary files a/logos/doomsdames.png and /dev/null differ diff --git a/logos/doubledown.png b/logos/doubledown.png deleted file mode 100644 index 810df49..0000000 Binary files a/logos/doubledown.png and /dev/null differ diff --git a/logos/durango.png b/logos/durango.png deleted file mode 100644 index 8504179..0000000 Binary files a/logos/durango.png and /dev/null differ diff --git a/logos/fdd.png b/logos/fdd.png deleted file mode 100644 index cfcd9d0..0000000 Binary files a/logos/fdd.png and /dev/null differ diff --git a/logos/green.png b/logos/green.png deleted file mode 100644 index 36aacd9..0000000 Binary files a/logos/green.png and /dev/null differ diff --git a/logos/hobots.png b/logos/hobots.png deleted file mode 100644 index b2b203c..0000000 Binary files a/logos/hobots.png and /dev/null differ diff --git a/logos/hustlen.png b/logos/hustlen.png deleted file mode 100644 index 6c15e05..0000000 Binary files a/logos/hustlen.png and /dev/null differ diff --git a/logos/logos.html b/logos/logos.html deleted file mode 100644 index 84a2a04..0000000 --- a/logos/logos.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - Roller Derby Logos - - - - - - - -

Roller Derby Logo Gallery

- -

- Here are the logos currently shipping with the - free Woozle Scoreboard. If you'd like - yours added, email your team name, preferred short name, and logo - to neale@woozle.org. -

- - - diff --git a/logos/logos.js b/logos/logos.js deleted file mode 100644 index 46c2733..0000000 --- a/logos/logos.js +++ /dev/null @@ -1,55 +0,0 @@ -teams = [ - ["LA", "bombs.png", "Los Alamos M'Atom Bombs"], - ["ARG", "animas.png", "Animas Valley Roller Girls"], - ["Taos", "taos.png", "Taos Whiplashes"], - ["RIP", "rip.png", "Rollergirls In Pagosa"], - ["4CRG", "4crg.png", "4 Corners Roller Girls"], - ["DRG", "durango.png", "Durango Roller Girls"], - ["SFe", "brawlers.png", "Disco Brawlers"], - ["HCRD", "aurora.png", "High City Derby Divas"], - ["Moab", "moab.png", "Moab Roller Derby"], - ["Bots", "hobots.png", "Albuquerque Ho-Bots"], - ["HNR", "hustlen.png", "HCDD Hustle N' Rollers"], - ["DD", "doubledown.png", "HCDD Double Down"], - ["DCD", "dcd.png", "Duke City Derby"], - ["RMRG", "rmrg.png", "Rocky Mountain Roller Girls"], - ["DD", "doomsdames.png", "Albuquerque Doomsdames"], - ["TEX", "texpistols.png", "El Paso Tex Pistols"], - ["PWH", "pistol.png", "El Paso Pistol Whip-Hers"], - ["MT", "minorthreat.png", "Minor Threat"], - ["CCR", "choicecity.png", "Choice City Rebels"], - ["DIA", "dia.png", "Derby Intelligence Agency"], - ["TRD", "tucson.png", "Tucson Roller Derby"], - ["TST", "saddletramps.jpg", "Tucson Saddle Tramps"], - ["TC", "tallcity.png", "Tall City Roller Betties"], - ["SS", "ssdd.png", "South Side Derby Dames"], - ["WTRD", "wtrd.png", "West Texas Roller Dollz"], - ["FDD", "fdd.png", "Faultline Derby Devilz"], - ["CHPA", "chupas.png", "New Mexico Chupacabras"], - ["TKRD", "tulare-kings.png", "Tulare Kings Roller Derby"], - ["CHRY", "cherries.png", "Los Alamos Cherry Bombs"], - ["PLG", "plague.png", "Zombie Plague"], - ["BDB", "bd-betties.png", "Black Diamond Betties"], - ["SKS", "sirens.png", "Sea to Sky Sirens"], - ["BBDD", "bbdd.png", "Battle Born Derby Demons"], - ["OKVD", "okvd.png", "Oklahoma Victory Dolls"], - ["MM", "munecas.png", "Muñecas Muertas"], - ["MARI", "marionettes.png", "Albuquerque Marionettes"], - ["QSDD", "qsdd.png", "Quad Skate Derby Dames"], - ["BWBS", "bwbs.png", "Backwoods Bombshells"], - ["CRH", "redhots.png", "Chicago Red Hots"], - ["HCRG", "campers.png", "Happy Camper Rollergirls"] -]; -teams.sort(); - -// Add special teams at the beginning -teams.splice(0, 0, - ["Blk", "black.png", "Black Team"], - ["Wht", "white.png", "White Team"], - ["Red", "red.png", "Red Team"], - ["Rng", "orange.png", "Orange Team"], - ["Ylo", "yellow.png", "Yellow Team"], - ["Grn", "green.png", "Green Team"], - ["Blu", "blue.png", "Blue Team"], - ["Vlt", "violet.png", "Violet Team"] -); diff --git a/logos/marionettes.png b/logos/marionettes.png deleted file mode 100644 index 635dfb9..0000000 Binary files a/logos/marionettes.png and /dev/null differ diff --git a/logos/minorthreat.png b/logos/minorthreat.png deleted file mode 100644 index aac503c..0000000 Binary files a/logos/minorthreat.png and /dev/null differ diff --git a/logos/moab.png b/logos/moab.png deleted file mode 100644 index 9c71bb0..0000000 Binary files a/logos/moab.png and /dev/null differ diff --git a/logos/munecas.png b/logos/munecas.png deleted file mode 100644 index 30dae0a..0000000 Binary files a/logos/munecas.png and /dev/null differ diff --git a/logos/okvd.png b/logos/okvd.png deleted file mode 100644 index 161fe01..0000000 Binary files a/logos/okvd.png and /dev/null differ diff --git a/logos/orange.png b/logos/orange.png deleted file mode 100644 index e830464..0000000 Binary files a/logos/orange.png and /dev/null differ diff --git a/logos/pistol.png b/logos/pistol.png deleted file mode 100644 index 4fdc843..0000000 Binary files a/logos/pistol.png and /dev/null differ diff --git a/logos/plague.png b/logos/plague.png deleted file mode 100644 index 4f7b10e..0000000 Binary files a/logos/plague.png and /dev/null differ diff --git a/logos/qsdd.png b/logos/qsdd.png deleted file mode 100644 index 33fb898..0000000 Binary files a/logos/qsdd.png and /dev/null differ diff --git a/logos/red.png b/logos/red.png deleted file mode 100644 index 8e46441..0000000 Binary files a/logos/red.png and /dev/null differ diff --git a/logos/redhots.png b/logos/redhots.png deleted file mode 100644 index 5dee613..0000000 Binary files a/logos/redhots.png and /dev/null differ diff --git a/logos/rip.png b/logos/rip.png deleted file mode 100644 index 6d98c6b..0000000 Binary files a/logos/rip.png and /dev/null differ diff --git a/logos/rmrg.png b/logos/rmrg.png deleted file mode 100644 index 2f93072..0000000 Binary files a/logos/rmrg.png and /dev/null differ diff --git a/logos/saddletramps.jpg b/logos/saddletramps.jpg deleted file mode 100644 index ecaf098..0000000 Binary files a/logos/saddletramps.jpg and /dev/null differ diff --git a/logos/sirens.png b/logos/sirens.png deleted file mode 100644 index 51c5374..0000000 Binary files a/logos/sirens.png and /dev/null differ diff --git a/logos/skate.png b/logos/skate.png deleted file mode 100644 index 8a63311..0000000 Binary files a/logos/skate.png and /dev/null differ diff --git a/logos/ssdd.png b/logos/ssdd.png deleted file mode 100644 index e7841f4..0000000 Binary files a/logos/ssdd.png and /dev/null differ diff --git a/logos/tallcity.png b/logos/tallcity.png deleted file mode 100644 index b846a15..0000000 Binary files a/logos/tallcity.png and /dev/null differ diff --git a/logos/taos.png b/logos/taos.png deleted file mode 100644 index b00f3d6..0000000 Binary files a/logos/taos.png and /dev/null differ diff --git a/logos/texpistols.png b/logos/texpistols.png deleted file mode 100644 index 4c6c474..0000000 Binary files a/logos/texpistols.png and /dev/null differ diff --git a/logos/tucson.png b/logos/tucson.png deleted file mode 100644 index 064b73c..0000000 Binary files a/logos/tucson.png and /dev/null differ diff --git a/logos/tulare-kings.png b/logos/tulare-kings.png deleted file mode 100644 index 1baddb1..0000000 Binary files a/logos/tulare-kings.png and /dev/null differ diff --git a/logos/violet.png b/logos/violet.png deleted file mode 100644 index 2067579..0000000 Binary files a/logos/violet.png and /dev/null differ diff --git a/logos/wftda.png b/logos/wftda.png deleted file mode 100644 index b55f3ce..0000000 Binary files a/logos/wftda.png and /dev/null differ diff --git a/logos/white.png b/logos/white.png deleted file mode 100644 index d6cfcb7..0000000 Binary files a/logos/white.png and /dev/null differ diff --git a/logos/wtrd.png b/logos/wtrd.png deleted file mode 100644 index 155ff19..0000000 Binary files a/logos/wtrd.png and /dev/null differ diff --git a/logos/yellow.png b/logos/yellow.png deleted file mode 100644 index 50d72ba..0000000 Binary files a/logos/yellow.png and /dev/null differ diff --git a/manifest.json b/manifest.json index 98e1ab5..6578ca5 100644 --- a/manifest.json +++ b/manifest.json @@ -15,6 +15,7 @@ }, "permissions": [ "storage", + "fileSystem", "fullscreen" ], "default_locale": "en", diff --git a/res/Flag_of_Canada.svg b/res/Flag_of_Canada.svg deleted file mode 100644 index 137eced..0000000 --- a/res/Flag_of_Canada.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/res/Flag_of_Mexico.svg b/res/Flag_of_Mexico.svg deleted file mode 100644 index 7ed18fa..0000000 --- a/res/Flag_of_Mexico.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/res/Flag_of_the_United_States.svg b/res/Flag_of_the_United_States.svg deleted file mode 100644 index f02c7a8..0000000 --- a/res/Flag_of_the_United_States.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/res/Magenta.woff b/res/Magenta.woff deleted file mode 100644 index f03433c..0000000 Binary files a/res/Magenta.woff and /dev/null differ diff --git a/res/PermanentMarker.woff b/res/PermanentMarker.woff deleted file mode 100644 index 756566a..0000000 Binary files a/res/PermanentMarker.woff and /dev/null differ diff --git a/res/Ubuntu-Bold.ttf b/res/Ubuntu-Bold.ttf new file mode 100644 index 0000000..c0142fe Binary files /dev/null and b/res/Ubuntu-Bold.ttf differ diff --git a/res/Ubuntu-Medium.ttf b/res/Ubuntu-Medium.ttf new file mode 100644 index 0000000..443ec8b Binary files /dev/null and b/res/Ubuntu-Medium.ttf differ diff --git a/res/background.js b/res/background.js index ba095fb..549f4e2 100644 --- a/res/background.js +++ b/res/background.js @@ -1,5 +1,5 @@ chrome.app.runtime.onLaunched.addListener(function() { - chrome.app.window.create('../scoreboard.html', { + chrome.app.window.create('res/scoreboard.html', { 'state': 'fullscreen' }) }) diff --git a/res/kitty.png b/res/kitty.png new file mode 100644 index 0000000..369f1dd Binary files /dev/null and b/res/kitty.png differ diff --git a/res/kitty.svg b/res/kitty.svg index ac85522..a113895 100644 --- a/res/kitty.svg +++ b/res/kitty.svg @@ -16,9 +16,9 @@ id="svg10326" inkscape:version="0.48.4 r9939" sodipodi:docname="kitty.svg" - inkscape:export-filename="/home/neale/src/scoreboard/res/icon.png" - inkscape:export-xdpi="90" - inkscape:export-ydpi="90"> + inkscape:export-filename="/home/neale/src/scoreboard/res/kitty.png" + inkscape:export-xdpi="226.56" + inkscape:export-ydpi="226.56"> @@ -40,16 +40,16 @@ guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" - inkscape:window-width="1077" - inkscape:window-height="805" + inkscape:window-width="1123" + inkscape:window-height="791" id="namedview16" showgrid="false" inkscape:object-paths="true" inkscape:zoom="4.12" - inkscape:cx="66.601148" - inkscape:cy="63.446618" - inkscape:window-x="7" - inkscape:window-y="20" + inkscape:cx="61.432328" + inkscape:cy="62.180965" + inkscape:window-x="37" + inkscape:window-y="0" inkscape:window-maximized="0" inkscape:current-layer="g3123" /> + + style="fill:none;stroke:#000000;stroke-width:200.27253723;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 1450.2032,-3137.6826 0,1248.591 -511.64069,0 C 881.2915,701.22207 4009.7535,665.64417 4444.9439,655.02983 c 440.5486,-10.74501 3769.6572,3.52234 3525.1572,-2706.06273 l -413.0677,0 -21.1228,-1011.5465 c -743.3521,312.4234 -4728.2816,291.1863 -6085.7074,-75.1032 z" + id="path3836" /> + + + + - + + style="fill:#d7d7d7;fill-opacity:1;fill-rule:nonzero;stroke:none" /> - - - - + id="path3817" + transform="matrix(75.103216,0,0,75.103216,-319.41636,-7129.8879)" + d="M 63.46875 24.34375 C 56.37403 24.445027 49.305249 25.847319 42.8125 28.5625 C 45.347492 29.705043 47.700467 30.969783 49.46875 31.9375 C 42.307696 33.307485 32.154532 39.403214 27.8125 44.0625 C 27.660728 42.306048 27.61196 40.434314 27.65625 38.53125 C 19.990813 45.998351 14.652581 56.398505 13.5 69.78125 L 23.5625 69.78125 L 23.5625 53.15625 C 41.636637 58.033397 94.696009 58.31617 104.59375 54.15625 L 104.875 67.625 L 115.5 67.625 C 114.03867 56.81115 109.78759 48.04701 103.8125 41.28125 C 103.78316 42.374949 103.74507 43.440791 103.65625 44.46875 C 99.314218 39.809464 89.161054 33.713735 82 32.34375 C 83.550637 31.495142 85.570097 30.428669 87.75 29.40625 C 80.202799 25.910769 71.813297 24.224632 63.46875 24.34375 z " + style="fill:none;fill-opacity:0.81578945999999997;stroke:#000000;stroke-width:2.66663074000000000;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> diff --git a/res/scoreboard.css b/res/scoreboard.css index 797c0b5..d178a36 100644 --- a/res/scoreboard.css +++ b/res/scoreboard.css @@ -1,14 +1,14 @@ @font-face { - font-family: 'Magenta'; - src: url('Magenta.woff') format('woff'); + font-family: 'Ubuntu'; + src: url('Ubuntu-Medium.ttf'); font-weight: normal; font-style: normal; } @font-face { - font-family: 'PermanentMarker'; - src: url('PermanentMarker.woff') format('woff'); - font-weight: normal; + font-family: 'Ubuntu'; + src: url('Ubuntu-Bold.ttf'); + font-weight: bold; font-style: normal; } @@ -122,7 +122,7 @@ input[readonly] { #jamtext, #periodtext, #preset { text-align: center; - font-family: PermanentMarker, sans-serif; + font-family: Ubuntu, sans-serif; font-weight: normal; font-size: 75%; diff --git a/scoreboard.html b/res/scoreboard.html similarity index 89% rename from scoreboard.html rename to res/scoreboard.html index c2ab087..c3827e5 100644 --- a/scoreboard.html +++ b/res/scoreboard.html @@ -20,9 +20,8 @@ Woozle Scoreboard - - - + +
diff --git a/res/scoreboard.js b/res/scoreboard.js index 434d076..41854bb 100644 --- a/res/scoreboard.js +++ b/res/scoreboard.js @@ -279,8 +279,6 @@ function score(team, points) { * Event handlers */ -var logo = {a:-1, b:-1}; - function leadJammer(team) { tgt = e("jammer-" + team); var on = ! tgt.className; @@ -290,6 +288,36 @@ function leadJammer(team) { if (on) tgt.className = "lead"; } + +function merf(fo) { + var la = e("logo-a"); + fo.file(function(file){la.src = URL.createObjectURL(file);}) + window.woo = woo; + console.log(woo); + e.src = woo.toURL(); +} + +function changeLogo(element) { + // Holy cow, asynchronous events galore here + + function setURL(file) { + element.src = URL.createObjectURL(file); + } + + function loaded(entry) { + entry.file(setURL); + } + + chrome.fileSystem.chooseEntry( + { + "accepts": [{ + "mimeTypes": ["image/*"] + }], + "acceptsAllTypes": false + }, + loaded); +} + function handle(event) { var tgt = event.target || window.event.srcElement; var team = tgt.id.substr(tgt.id.length - 1); @@ -301,14 +329,7 @@ function handle(event) { case "logo-a": case "logo-b": if (state == SETUP) { - var t, name; - - logo[team] = (teams.length + logo[team] + adj) % teams.length; - t = teams[logo[team]]; - - name = t[0]; - - tgt.src = "logos/" + t[1]; + changeLogo(tgt); } else { score(team, -adj); } @@ -552,8 +573,8 @@ function load() { "period_clock": -1, "score_a": 0, "score_b": 0, - "logo_a": "logos/black.png", - "logo_b": "logos/white.png", + "logo_a": "kitty.png", + "logo_b": "kitty.png", "timeouts_a": -1, "timeouts_b": -1 }, load_cb);