Fix accounts href in limit popup

pull/1/head
yflory 6 years ago
parent 59d5723f3e
commit 2d881caaeb

@ -832,11 +832,17 @@ MessengerUI, Messages) {
return $spin;
};
var createLimit = function (toolbar) {
var createLimit = function (toolbar, config) {
var $limitIcon = $('<span>', {'class': 'fa fa-exclamation-triangle'});
var $limit = toolbar.$userAdmin.find('.'+LIMIT_CLS).attr({
'title': Messages.pinLimitReached
}).append($limitIcon).hide();
var priv = config.metadataMgr.getPrivateData();
var origin = priv.origin;
var l = document.createElement("a");
l.href = origin;
var todo = function (e, overLimit) {
if (e) { return void console.error("Unable to get the pinned usage", e); }
if (overLimit) {
@ -845,7 +851,7 @@ MessengerUI, Messages) {
key = 'pinLimitReachedAlertNoAccounts';
}
$limit.show().click(function () {
UI.alert(Messages._getKey(key, [encodeURIComponent(window.location.hostname)]), null, true);
UI.alert(Messages._getKey(key, [encodeURIComponent(l.hostname)]), null, true);
});
}
};

Loading…
Cancel
Save