0
0
Fork 0
mirror of https://gitlab.com/Oreolek/salet-module.git synced 2024-06-26 03:50:49 +03:00

Catch exceptions if localStorage is closed

Allows us to run inside sandboxed iframes
This commit is contained in:
Alexander Yakovlev 2020-10-24 19:21:08 +07:00
parent acb3ddd8f5
commit bd1ac09a20
Signed by: oreolek
GPG key ID: 1CDC4B7820C93BD3
3 changed files with 6 additions and 3 deletions

View file

@ -37,7 +37,7 @@ task 'compile', 'Compile all CoffeeScript files', ->
task 'build', 'Compile and minify all CoffeeScript files', ->
invoke 'compile'
exec 'closure-compiler --compilation_level ECMASCRIPT5 --compilation_level SIMPLE --create_source_map=lib/index.min.js.map --js_output_file lib/index.min.js lib/index.js', (err) ->
exec 'google-closure-compiler --compilation_level ECMASCRIPT5 --compilation_level SIMPLE --create_source_map=lib/index.min.js.map --js_output_file lib/index.min.js lib/index.js', (err) ->
if err
util.log err
process.exit 1 # abort npm packaging

View file

@ -1,6 +1,6 @@
{
"name": "salet",
"version": "2.0.1",
"version": "2.0.2",
"description": "A general client-side framework for cybertext interactive fiction games.",
"keywords": [
"ifiction",

View file

@ -272,7 +272,10 @@ class SaletView
# Feature detection
@hasLocalStorage = () ->
return window.localStorage?
try
return window.localStorage?
catch e
return false
# Any point that an option list appears, its options are its first links.
@fixClicks = () ->