Permalink
Browse files

cleanup - removed unreferenced functions, moved dangling variable dec…

…laration
  • Loading branch information...
1 parent 8de9ffd commit 2c485ca125688fbd30e739511ba87eca5c3dae05 @asylumfunk committed Sep 29, 2012
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="webinterface.default"
- version="2.0.4"
+ version="2.0.5"
name="Default"
provider-name="Team XBMC">
<requires>
@@ -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>
@asylumfunk

asylumfunk Oct 5, 2012

Owner

double-bump (to match addon.xml)

</body>
</html>
@@ -19,7 +19,7 @@
*/
/* Global Paths */
-
+var commsErrorTimeout;
@asylumfunk

asylumfunk Oct 5, 2012

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';
@@ -50,32 +50,6 @@ function durationToString(duration) {
return result;
}
-function timeToString(duration, showMilliseconds) {
@asylumfunk

asylumfunk Oct 5, 2012

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;
}
@@ -84,8 +58,6 @@ function applyDeviceFixes() {
document.addEventListener('touchmove', function(e){ e.preventDefault(); });
}
-var commsErrorTimeout;
-
@asylumfunk

asylumfunk Oct 5, 2012

Owner

see above

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

asylumfunk Oct 5, 2012

Owner

This was never referenced.

- setCookie(name,"",-1);
-}
@@ -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'),
@asylumfunk

asylumfunk Oct 5, 2012

Owner

double-bump (to match addon.xml)

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

0 comments on commit 2c485ca

Please sign in to comment.