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:
parent
acb3ddd8f5
commit
bd1ac09a20
2
Cakefile
2
Cakefile
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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 = () ->
|
||||
|
|
Loading…
Reference in a new issue