Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 16 additions and 14 deletions.
  1. +11 −6 code.js
  2. +4 −5 index.html
  3. +1 −3 tmradio.manifest
View
17 code.js
@@ -39,7 +39,7 @@ tmradio.iphone = {
)
.done(function(data){
$("#results_ul").text(data.message);
- tmradio.iphone.getCurrentTrackInfo();
+ tmradio.iphone.getCurrentTrackInfo(true);
})
.fail(function(){
alert('Looks like you have a bad auth-token');
@@ -50,7 +50,7 @@ tmradio.iphone = {
$('#log_in_button').text('Log In');
});
},
- getCurrentTrackInfo: function() {
+ getCurrentTrackInfo: function(oob) {
// Show a loading message
var results_ul = $("#results_ul")
@@ -72,7 +72,10 @@ tmradio.iphone = {
if (time_to_check <= 0) {
time_to_check = 1000 * 5;
}
- window.setTimeout(tmradio.iphone.getCurrentTrackInfo, time_to_check);
+
+ if (oob == undefined) {
+ window.setTimeout(tmradio.iphone.getCurrentTrackInfo, time_to_check);
+ }
if (tmradio.iphone.token &&
tmradio.iphone.v.css('display') == 'none' &&
@@ -108,9 +111,11 @@ tmradio.iphone = {
);
if (info.download != null) {
- results_ul.append(
- '<span id="download">↓DL</span> '
- );
+ results_ul.append('<span id="download">↓DL</span> ');
+ }
+
+ if (info.image != null) {
+ results_ul.prepend('<img src="' + info.image + '" align="left" width="32" height="32" style="margin-right: 2px;">');
}
},
formatTime: function(time) {
View
9 index.html
@@ -38,11 +38,10 @@
</li>
</ul>
- <div id="vote" style="display:none;">
- <div class="center">
- <img id="rocks" src="rocks.png" /><img id="sucks" src="sucks.png" />
- </div>
- </div>
+ <ul class="individual" style="display: none;" id="vote">
+ <li><a id="rocks" class="greenButton">Rocks</a></li>
+ <li><a id="sucks" class="redButton">Sucks</a></li>
+ </ul>
<div id="player" style="display:none;">
<!-- place for player -->
View
4 tmradio.manifest
@@ -1,6 +1,6 @@
CACHE MANIFEST
#
-# Cache manifest version 15
+# Cache manifest version 16
#
code.js
icon.png
@@ -10,9 +10,7 @@ jqtouch/jqtouch-jquery.min.js
phone_startup.png
Play_Button.png
reload.png
-rocks.png
Stop_Button.png
-sucks.png
themes/css/jqtouch.css
themes/img/jqt/loading.gif
themes/img/jqt/on_off.png

No commit comments for this range

Something went wrong with that request. Please try again.