File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1149,15 +1149,24 @@ <h1 id="knowmuchupdates">12 Apps have updates</h1>
11491149
11501150
11511151 var networkretries = 0 ;
1152+ let shuffledEntries = null ;
1153+
11521154 function loadThemes ( ) {
11531155 const container = document . getElementById ( "themeslist" ) ;
11541156
1155- fetch ( 'https://adthoughtsglobal.github.io/Nova-Store/db/themes.json' )
1156- . then ( response => response . json ( ) )
1157+ fetch ( 'https://adthoughtsglobal.github.io/Nova-Store/db/themes.json' , { cache : "no-store" } )
1158+ . then ( r => r . json ( ) )
11571159 . then ( data => {
1158- container . innerHTML = '' ;
1160+ if ( ! shuffledEntries ) {
1161+ shuffledEntries = Object . entries ( data ) ;
1162+ for ( let i = shuffledEntries . length - 1 ; i > 0 ; i -- ) {
1163+ const j = Math . floor ( Math . random ( ) * ( i + 1 ) ) ;
1164+ [ shuffledEntries [ i ] , shuffledEntries [ j ] ] = [ shuffledEntries [ j ] , shuffledEntries [ i ] ] ;
1165+ }
1166+ }
11591167
1160- Object . entries ( data ) . forEach ( ( [ themeName , themeData ] ) => {
1168+ container . innerHTML = '' ;
1169+ shuffledEntries . forEach ( ( [ themeName , themeData ] ) => {
11611170 const themeContainer = document . createElement ( 'div' ) ;
11621171 themeContainer . classList . add ( "themesing" ) ;
11631172 themeContainer . style . outline = `1px solid ${ themeData . colors [ "--col-bg3" ] } ` ;
Original file line number Diff line number Diff line change 1515 --col-bad : # d44343 ;
1616
1717 /* sizing */
18- --sizing-normal : .3 em ;
18+ --sizing-normal : .5 em ;
1919 --sizing-huge : 1em ;
20- --sizing-nano : .2 em ;
20+ --sizing-nano : .3 em ;
2121
2222 --siz-radius1 : 0.5em ;
2323 --siz-radius2 : 0.35em ;
You can’t perform that action at this time.
0 commit comments