Skip to content

Commit

Permalink
Added QR code from Google Charts for easier phone access
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewburgess committed Jan 8, 2012
1 parent 3738374 commit 90b0263
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Spotify/Spartify/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ <h1>Spartify</h1>
</section>
<section class="view-party">
<p class="message">Great! Now tell your friends to go to spartify.com on their mobile phones and enter the following party code to start voting: <code id="party-code">XXXXX</code>
<p><img id="qr-code" /></p>
<p><input id="search" placeholder="Search for songs">
<ul class="track-list" id="search-results"></ul>
<h2>Queue</h2>
Expand Down
3 changes: 2 additions & 1 deletion Spotify/Spartify/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"en"
],
"RequiredPermissions": [
"http://www.spartify.com"
"http://www.spartify.com",
"https://chart.googleapis.com"
],
"ApiPermissions": {
"core": ["private"]
Expand Down
2 changes: 2 additions & 0 deletions Spotify/Spartify/spartify.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ var el = {
createParty: $('#create-party'),
leaveParty: $('#leave-party'),
partyCode: $('#party-code'),
qrCode: $('#qr-code'),
queue: $('#queue'),
queueHeader: $('.view-party h2'),
search: $('#search'),
Expand Down Expand Up @@ -192,6 +193,7 @@ function enterParty(code) {
el.queueHeader.hide();
localStorage.partyCode = code;
el.partyCode.text(localStorage.partyCode);
el.qrCode.attr('src', 'https://chart.googleapis.com/chart?chs=100x100&cht=qr&chl=http://spartify.com/' + localStorage.partyCode);
el.body.attr('id', 'view-party');

playlist = null;
Expand Down

0 comments on commit 90b0263

Please sign in to comment.