diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-04-04 13:31:15 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-04-04 13:31:15 +0200 |
| commit | b0ada80bc3a7882ac50c16188004e34061af5845 (patch) | |
| tree | fc1315b3c9b78cfbd7be10f160210a38a03ad15d /js/app.js | |
| parent | 47fafe89da96e698782db86c00ddd25bebc9b623 (diff) | |
| parent | 165bb4883c59a8b529c09b08bb75c9b3407c9c69 (diff) | |
Merge branch 'master' of lmno:ascii
Diffstat (limited to 'js/app.js')
| -rw-r--r-- | js/app.js | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -6,6 +6,8 @@ var selecting = false var filling = false var changed = false var transforming = false +var mirror_x = false +var mirror_y = false var focused var canvas, tools, palette, controls, brush, mode @@ -80,7 +82,15 @@ function bind () { }) window.onbeforeunload = function() { - if (changed) return "You have edited this drawing." + // if (changed && !in_iframe()) return "You have edited this drawing." + } + + function in_iframe () { + try { + return window.self !== window.top; + } catch (e) { + return true; + } } } |
