drop-shadow(.1em .1em 0 #fff)
drop-shadow(-.1em .1em 0 #fff);
}
+ .upInTheAirGame .ui-page.options .warning.storage {
+ display: none;
+ }
.upInTheAirGame .ui-page.options .feather label:nth-child(1) { z-index: 50; }
.upInTheAirGame .ui-page.options .feather label:nth-child(2) { z-index: 49; }
.upInTheAirGame .ui-page.options .feather label:nth-child(3) { z-index: 48; }
</div>
</div>
+<div class="area warning storage"><strong>Unable to store data:</strong> Your browser is preventing the game from using the local data storage, possibly due to strict privacy settings. Your in-game data will not be saved between visits.</div>
<button class="goto title">Back</button>
</div>
'tapmode': false,
},
};
- let stored = window['localStorage'].getItem('upInTheAirGameSettings');
+ let stored;
+ try {
+ stored = window['localStorage'].getItem('upInTheAirGameSettings');
+ game.ui.root.querySelector('.ui-page.options .warning.storage').style.display = 'none';
+ } catch(error) {
+ game.ui.root.querySelector('.ui-page.options .warning.storage').style.display = 'block';
+ }
if(stored) {
let merge = (source, target) => {
for(let k of Object.keys(source)) {
game.settings['keyboard'][direction] = ui.querySelector('.keyboard button.' + direction).value.split('|');
}
game.settings['keyboard']['tapmode'] = ui.querySelector('input[value="tapmode"]').checked;
- window['localStorage'].setItem('upInTheAirGameSettings', JSON.stringify(game.settings));
+ try {
+ window['localStorage'].setItem('upInTheAirGameSettings', JSON.stringify(game.settings));
+ game.ui.root.querySelector('.ui-page.options .warning.storage').style.display = 'none';
+ } catch(error) {
+ game.ui.root.querySelector('.ui-page.options .warning.storage').style.display = 'block';
+ }
for(let audioCategory of ['music', 'sounds']) {
game.settings['audio'][audioCategory] = parseInt(ui.querySelector('.audio input[type=range].' + audioCategory).value, 10) / 100;
btn.classList.remove('active');
}
});
- game.ui.root.querySelectorAll('.options > div.area').forEach((area) => {
+ game.ui.root.querySelectorAll('.options > div.area.twocol').forEach((area) => {
if(area.classList.contains('general')) {
area.style.display = 'flex';
} else {