Skip to content

Commit

Permalink
cleanup - removed unreferenced functions, moved dangling variable dec…
Browse files Browse the repository at this point in the history
…laration
  • Loading branch information
asylumfunk committed Oct 5, 2012
1 parent 8de9ffd commit 2c485ca
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 35 deletions.
2 changes: 1 addition & 1 deletion addons/webinterface.default/addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="webinterface.default"
version="2.0.4"
version="2.0.5"

This comment has been minimized.

Copy link
@asylumfunk

asylumfunk Oct 5, 2012

Author Owner

bump

name="Default"
provider-name="Team XBMC">
<requires>
Expand Down
2 changes: 1 addition & 1 deletion addons/webinterface.default/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@
<div id="nowPlayingPlaylist" style="display: none;"></div>
</div>
</div>
<script type="text/javascript" src="js/xbmc.launcher.js?v=2.0.3"></script>
<script type="text/javascript" src="js/xbmc.launcher.js?v=2.0.5"></script>

This comment has been minimized.

Copy link
@asylumfunk

asylumfunk Oct 5, 2012

Author Owner

double-bump (to match addon.xml)

</body>
</html>
33 changes: 1 addition & 32 deletions addons/webinterface.default/js/Core.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

/* Global Paths */

var commsErrorTimeout;

This comment has been minimized.

Copy link
@asylumfunk

asylumfunk Oct 5, 2012

Author Owner

This was dangling further down in the file. JS interprets it this way (vars declared immediately) anyway, plus the code is now more obvious.

var JSON_RPC = 'jsonrpc';
var DEFAULT_ALBUM_COVER = 'images/DefaultAlbumCover.png';
var DEFAULT_VIDEO_COVER = 'images/DefaultVideo.png';
Expand Down Expand Up @@ -50,32 +50,6 @@ function durationToString(duration) {
return result;
}

function timeToString(duration, showMilliseconds) {

This comment has been minimized.

Copy link
@asylumfunk

asylumfunk Oct 5, 2012

Author Owner

This was never referenced.

if (!duration) {
return '00:00';
}
milliseconds = duration.milliseconds
var result = '';
if (duration.hours) {
result += (duration.hours < 10 ? '0' + duration.hours : duration.hours) + ':';
}
result += (duration.minutes < 10 ? '0' + duration.minutes : duration.minutes) + ':' + (duration.seconds < 10 ? '0' + duration.seconds : duration.seconds);
if (showMilliseconds) {
result += '.';
if (duration.milliseconds < 1000) {
result += '.';
if (duration.milliseconds < 100) {
result += '0';
if (duration.milliseconds < 10) {
result += '0';
}
}
}
result += duration.milliseconds;
}
return result;
}

function timeToDuration(time) {
return time.hours * 3600 + time.minutes * 60 + time.seconds;
}
Expand All @@ -84,8 +58,6 @@ function applyDeviceFixes() {
document.addEventListener('touchmove', function(e){ e.preventDefault(); });
}

var commsErrorTimeout;

This comment has been minimized.

Copy link
@asylumfunk

asylumfunk Oct 5, 2012

Author Owner

see above

function displayCommunicationError(m) {
clearTimeout(commsErrorTimeout);
var message = m || 'Connection to server lost';
Expand Down Expand Up @@ -117,6 +89,3 @@ function getCookie(name) {
return null;
}

function deleteCookie(name) {

This comment has been minimized.

Copy link
@asylumfunk

asylumfunk Oct 5, 2012

Author Owner

This was never referenced.

setCookie(name,"",-1);
}
2 changes: 1 addition & 1 deletion addons/webinterface.default/js/xbmc.launcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
var i,
script,
debug = false, /* Set to true to disable cached javascript */
version = (debug ? Math.random() : '2.0.3'),
version = (debug ? Math.random() : '2.0.5'),

This comment has been minimized.

Copy link
@asylumfunk

asylumfunk Oct 5, 2012

Author Owner

double-bump (to match addon.xml)

scripts = [
"js/jquery-1.5.2.min.js",
"js/jquery.lazyload.js",
Expand Down

0 comments on commit 2c485ca

Please sign in to comment.