Skip to content

Commit

Permalink
Different logic fix to solve #477 (#501)
Browse files Browse the repository at this point in the history
* added css property for better link visibility

* Test for greater than 9 against "logoID", not "color"

---------

Co-authored-by: Muhammad Haroon <[email protected]>
Co-authored-by: Devin Ulibarri <[email protected]>
  • Loading branch information
3 people authored Oct 18, 2024
1 parent cd5520c commit 565a75a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $(document).ready(function(){
['006E00', 'FFD732'], ['6E008C', 'FFD732']];
var color = Math.floor((Math.random() * 12));
var logoID = color + 1;
if (color < 10) {
if (logoID < 10) {
logoID = "0" + logoID;
}
document.querySelector('#defaultIcon1').href = 'https://www.sugarlabs.org/assets/favicon_' + logoID + '.png';
Expand Down Expand Up @@ -121,4 +121,4 @@ $(document).ready(function(){
$('.js-fullheight').css('height', $(window).height());
});
};
});
});

0 comments on commit 565a75a

Please sign in to comment.