Skip to content

Commit

Permalink
Merge branch 'hotfix/favicon-change' into feature/nc-28
Browse files Browse the repository at this point in the history
  • Loading branch information
LinneyS committed Dec 13, 2023
2 parents b5d76ce + 86a9251 commit 5a9611e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/listener.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,12 @@
});

window.addEventListener("DOMNodeRemoved", function(event) {
if ($(event.target).length && $(OCA.Onlyoffice.frameSelector).length
if ($(event.target).length
&& $(OCA.Onlyoffice.frameSelector).length > 0
&& $(OCA.Onlyoffice.frameSelector)[0].contentWindow
&& $(OCA.Onlyoffice.frameSelector)[0].contentWindow.OCA
&& ($(event.target)[0].id === "viewer" || $(event.target)[0].id === $(OCA.Onlyoffice.frameSelector)[0].id)) {

OCA.Onlyoffice.changeFavicon($(OCA.Onlyoffice.frameSelector)[0].contentWindow.OCA.Onlyoffice.faviconBase);
window.document.title = $(OCA.Onlyoffice.frameSelector)[0].contentWindow.OCA.Onlyoffice.titleBase;
}
Expand Down

0 comments on commit 5a9611e

Please sign in to comment.