From: Alexander Ebert Date: Sun, 23 Nov 2014 20:13:25 +0000 (+0100) Subject: Quick work-around for broken cross-domain support in Favico.js X-Git-Tag: 2.1.0_Beta_1~187 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c84300e1712861d44924188fa024a0f5574edb8c;p=GitHub%2FWoltLab%2FWCF.git Quick work-around for broken cross-domain support in Favico.js --- diff --git a/wcfsetup/install/files/js/WCF.User.js b/wcfsetup/install/files/js/WCF.User.js index 56c358977e..e2eb894ad3 100644 --- a/wcfsetup/install/files/js/WCF.User.js +++ b/wcfsetup/install/files/js/WCF.User.js @@ -1279,10 +1279,15 @@ WCF.Notification.UserPanel = WCF.UserPanel.extend({ * @see WCF.UserPanel.init() */ init: function(showAllLink) { - this._favico = new Favico({ - animation: 'none', - type: 'circle', - }); + this._favico = null; + + try { + this._favico = new Favico({ + animation: 'none', + type: 'circle', + }); + } + catch (e) { /* ignore for now */ } this._noItems = 'wcf.user.notification.noMoreNotifications'; this._proxy = new WCF.Action.Proxy({ @@ -1293,7 +1298,7 @@ WCF.Notification.UserPanel = WCF.UserPanel.extend({ this._super('userNotifications'); // update page title - if (this._container.data('count')) { + if (this._container.data('count') && this._favico !== null) { this._favico.badge(this._container.data('count')); } @@ -1397,7 +1402,9 @@ WCF.Notification.UserPanel = WCF.UserPanel.extend({ this._super(count); - this._favico.badge(count); + if (this._favico !== null) { + this._favico.badge(count); + } }, /**