mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
REFACTOR: Superfluous arguments passed to function resolveSize (#9678)
resolveSize accepts only one param
This commit is contained in:
parent
affc79bb68
commit
e74170cd9e
@ -29,7 +29,7 @@ function resolveSize(img) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Detect square images and apply smaller onebox-avatar class
|
// Detect square images and apply smaller onebox-avatar class
|
||||||
function applySquareGenericOnebox($elem, normalizedUrl) {
|
function applySquareGenericOnebox($elem) {
|
||||||
if (!$elem.hasClass("whitelistedgeneric")) {
|
if (!$elem.hasClass("whitelistedgeneric")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -43,10 +43,10 @@ function applySquareGenericOnebox($elem, normalizedUrl) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (img.complete) {
|
if (img.complete) {
|
||||||
resolveSize(img, $elem, normalizedUrl);
|
resolveSize(img);
|
||||||
} else {
|
} else {
|
||||||
$img.on("load.onebox", () => {
|
$img.on("load.onebox", () => {
|
||||||
resolveSize(img, $elem, normalizedUrl);
|
resolveSize(img);
|
||||||
$img.off("load.onebox");
|
$img.off("load.onebox");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user