diff options
Diffstat (limited to 'js/app.js')
| -rw-r--r-- | js/app.js | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -82,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; + } } } |
