Skip to content

Commit

Permalink
Fix home.js issues
Browse files Browse the repository at this point in the history
  • Loading branch information
salbahra committed Jun 20, 2024
1 parent 7cd962c commit 66d027a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions www/js/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,11 @@
// Insert favicon for web page
insertStyleSheet( assetLocation + "img/favicon.ico", "shortcut icon" );

// Insert jQuery and run init function on completion
insertScript( assetLocation + "js/app.js", function() {
// Insert jQuery
insertScript( assetLocation + "js/jquery.js" );

// Insert primary application script
insertScript( assetLocation + "js/main.js", function() {
try {
localStorage.setItem( "testQuota", "true" );
localStorage.removeItem( "testQuota" );
Expand All @@ -142,6 +145,15 @@
}
} );

// Insert libraries
insertScript( assetLocation + "js/libs.js" )

// Insert analog sensor (if supported)
insertScript( assetLocation + "js/analog.js" );

// Insert charting library for analog support
insertScript( assetLocation + "js/apexcharts.min.js" );

// Insert home page icon for iOS
insertStyleSheet( assetLocation + "res/ios-web/icons/icon.png", "apple-touch-icon" );

Expand Down
2 changes: 1 addition & 1 deletion www/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -13003,7 +13003,7 @@ function checkCurrLang() {
}

function getAppURLPath() {
return currLocal ? $.mobile.path.parseUrl( $( "head" ).find( "script[src$='app.js']" ).attr( "src" ) ).hrefNoHash.slice( 0, -9 ) : "";
return currLocal ? $.mobile.path.parseUrl( $( "head" ).find( "script[src$='main.js']" ).attr( "src" ) ).hrefNoHash.slice( 0, -9 ) : "";
}

function getUrlVars( url ) {
Expand Down

0 comments on commit 66d027a

Please sign in to comment.