1
- var banners = [
2
-
3
- { "name" :"sor4" , "logo" :"sor4-logo.png" , "screenshot" :"sor4-screenshot.jpg" , "url" :"https:\/\/www.streets4rage.com\/" , "pixelart" :false , "tags" :[ "2D" , "Console" , "PlayStation4" , "XboxOne" , "NintendoSwitch" , "Featured" ] } ,
4
- { "name" :"paladin" , "logo" :"paladin-logo.png" , "screenshot" :"paladin-screenshot.jpg" , "url" :"http:\/\/pumpkin-games.net\/paladin.php" , "pixelart" :false , "tags" :[ "2D" , "Console" , "Mac" , "Linux" , "Desktop" , "XboxOne" , "NintendoSwitch" , "Featured" ] } ,
5
- { "name" :"fhook" , "logo" :"fhook-logo.png" , "screenshot" :"fhook-screenshot.png" , "url" :"http:\/\/flinthook.com\/" , "pixelart" :true , "tags" :[ "2D" , "Console" , "PlayStation4" , "XboxOne" , "NintendoSwitch" , "Featured" ] } ,
6
- { "name" :"daryl" , "logo" :"daryl-logo.png" , "screenshot" :"daryl-screenshot.jpg" , "url" :"https:\/\/danandgarygames.com\/superdaryldeluxe" , "pixelart" :false , "tags" :[ "2D" , "Console" , "PlayStation4" , "NintendoSwitch" , "Featured" ] } ,
7
- { "name" :"chasm" , "logo" :"chasm-logo.png" , "screenshot" :"chasm-screenshot.png" , "url" :"http:\/\/www.chasmgame.com\/" , "pixelart" :true , "tags" :[ "2D" , "Console" , "PlayStation4" , "PSVita" , "NintendoSwitch" , "Featured" ] } ,
8
- { "name" :"celeste" , "logo" :"celeste-logo.png" , "screenshot" :"celeste-screenshot.png" , "url" :"http:\/\/www.celestegame.com\/" , "pixelart" :true , "tags" :[ "2D" , "Console" , "XboxOne" , "NintendoSwitch" , "PlayStation4" , "Featured" ] } ,
9
- { "name" :"redungeon" , "logo" :"redungeon-logo.png" , "screenshot" :"redungeon-screenshot.png" , "url" :"http:\/\/www.eneminds.com\/redungeon\/" , "pixelart" :true , "tags" :[ "Mobile" , "iOS" , "Android" , "Featured" ] } ,
10
- { "name" :"squareheroes" , "logo" :"squareheroes-logo.png" , "screenshot" :"squareheroes-screenshot.png" , "url" :"http:\/\/www.squareheroes.com\/" , "pixelart" :false , "tags" :[ "Console" , "PlayStation4" , "Featured" ] } ,
11
- { "name" :"wayward" , "logo" :"wayward-logo.png" , "screenshot" :"wayward-screenshot.jpg" , "url" :"http:\/\/www.wtfrontier.com\/" , "pixelart" :false , "tags" :[ "Windows" , "Desktop" , "Featured" ] } ,
12
- { "name" :"skulls" , "logo" :"skulls-logo.png" , "screenshot" :"skulls-screenshot.jpg" , "url" :"http:\/\/skullsoftheshogun.com\/" , "pixelart" :false , "tags" :[ "Console" , "PlayStation4" , "Mobile" , "Android" , "Featured" ] } ,
13
- { "name" :"ty" , "logo" :"ty-logo.png" , "screenshot" :"ty-screenshot.jpg" , "url" :"http:\/\/www.kromestudios.com\/TY\/" , "pixelart" :false , "tags" :[ "Desktop" , "Windows" , "2D" , "Featured" ] } ,
14
- { "name" :"hockey" , "logo" :"oth-logo.png" , "screenshot" :"oldtimehockey-screenshot.jpg" , "url" :"http:\/\/www.bushhockeyleague.com\/" , "pixelart" :false , "tags" :[ "Console" , "PlayStation4" , "XboxOne" , "3D" , "Featured" ] } ,
15
- { "name" :"flight" , "logo" :"flight-logo.png" , "screenshot" :"flight-screenshot.jpg" , "url" :"http:\/\/www.infinite-flight.com\/" , "pixelart" :false , "tags" :[ "iOS" , "Android" , "Mobile" , "3D" , "Featured" ] } ,
16
- { "name" :"neurovoider" , "logo" :"neurovoider-logo.png" , "screenshot" :"neurovoider-screenshot.jpg" , "url" :"http:\/\/www.neurovoider.com\/" , "pixelart" :true , "tags" :[ "Windows" , "Mac" , "Linux" , "XboxOne" , "PlayStation4" , "PSVita" , "NintendoSwitch" , "2D" , "Desktop" , "Console" , "Featured" ] } ,
17
- { "name" :"apotheon" , "logo" :"apotheon-logo.png" , "screenshot" :"apotheon-screenshot.jpg" , "url" :"http:\/\/www.apotheongame.com\/" , "pixelart" :false , "tags" :[ "PlayStation4" , "2D" , "Console" , "Featured" ] } ,
18
- { "name" :"axiom" , "logo" :"axiom-logo.png" , "screenshot" :"axiom-screenshot.png" , "url" :"http:\/\/www.axiomverge.com\/" , "pixelart" :true , "tags" :[ "PlayStation4" , "XboxOne" , "NintendoSwitch" , "PSVita" , "2D" , "Console" , "Featured" ] } ,
19
- { "name" :"towerfall" , "logo" :"towerfall-logo.png" , "screenshot" :"towerfall-screenshot.jpg" , "url" :"http:\/\/www.towerfall-game.com\/" , "pixelart" :true , "tags" :[ "PlayStation4" , "XboxOne" , "NintendoSwitch" , "PSVita" , "2D" , "Console" , "Featured" ] } ,
20
- { "name" :"stardew" , "logo" :"stardew-logo4.png" , "screenshot" :"stardew-screenshot.png" , "url" :"http:\/\/www.stardewvalley.net\/" , "pixelart" :true , "tags" :[ "PlayStation4" , "XboxOne" , "NintendoSwitch" , "PSVita" , "2D" , "Console" , "Mac" , "Linux" , "Desktop" , "Featured" ] } ,
21
- { "name" :"toothandtail" , "logo" :"toothandtail-logo.png" , "screenshot" :"toothandtail-screenshot.png" , "url" :"http:\/\/www.toothandtailgame.com\/" , "pixelart" :false , "tags" :[ "PlayStation4" , "Windows" , "2D" , "Console" , "Desktop" , "Featured" ] }
22
-
23
- ] ;
24
-
25
1
var preload = new Array ( ) ;
26
2
var shuffled = [ ] ;
27
3
function shuffle ( a , b , c , d ) { c = a . length ; while ( c ) b = Math . random ( ) * ( -- c + 1 ) | 0 , d = a [ c ] , a [ c ] = a [ b ] , a [ b ] = d }
@@ -51,11 +27,11 @@ function init_banner()
51
27
if ( result != null )
52
28
{
53
29
var name = result [ 1 ] ;
54
- for ( var i = 0 ; i < banners . length ; i ++ )
30
+ for ( var i = 0 ; i < games . length ; i ++ )
55
31
{
56
- if ( banners [ i ] . name == name )
32
+ if ( games [ i ] . name == name )
57
33
{
58
- show_banner ( banners [ i ] ) ;
34
+ show_banner ( games [ i ] ) ;
59
35
return ;
60
36
}
61
37
}
@@ -67,9 +43,13 @@ function init_banner()
67
43
68
44
function random_banner ( )
69
45
{
46
+ var featuredBanners = games . filter ( function ( banner ) {
47
+ return banner . tags . includes ( 'Featured' ) ;
48
+ } ) ;
49
+
70
50
if ( shuffled . length <= 1 )
71
51
{
72
- shuffled = shuffled . concat ( banners ) ;
52
+ shuffled = shuffled . concat ( featuredBanners ) ;
73
53
shuffled = unique ( shuffled ) ;
74
54
shuffle ( shuffled ) ;
75
55
}
@@ -102,6 +82,4 @@ function show_banner(title)
102
82
logoImage . parentElement . href = title . url ;
103
83
}
104
84
105
- var BannerPath = "/images/showcase-header/" ;
106
-
107
85
init_banner ( ) ;
0 commit comments