3 # returns the least recently seen banner that is not hidden
8 :alt => 'State of the Map US 2016',
9 :link => 'http://stateofthemap.us/',
10 :img => 'banners/sotmus-2016.jpg'
14 :alt => 'State of the Map 2016',
15 :link => 'http://2016.stateofthemap.org/',
16 :img => 'banners/sotm-2016.jpg'
24 active_banners.each do |k, v|
25 ckey = cookie_id(v[:id]).to_sym
26 cval = cookies[ckey] || 0
27 next if cval == 'hide'
30 # rotate all banner queue positions
33 cookies[ckey] = index - 1
36 # pick banner with mininum queue position
45 cookies[cookieKey] = active_banners.length # bump to end of queue
46 active_banners[bannerKey]