Merge pull request #137 from YunoHost/1354-prevent-duplicate-button-in-app-iframe

Prevent duplicate portal button when app uses iframes. Fix #1354
This commit is contained in:
Alexandre Aubin 2019-05-28 16:31:34 +02:00 committed by GitHub
commit 3a8a1bdaec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -229,8 +229,11 @@ window.addEvent(document, 'DOMContentLoaded', function() {
if (in_app) if (in_app)
{ {
// Do not load inside an app iframe (Roundcube visualisation panel for example).
if (window.frameElement == null) {
init_portal_button_and_overlay(); init_portal_button_and_overlay();
} }
}
else else
{ {
init_portal(); init_portal();