Hide images if error on billboards to fix blocking page (#20419)
* Hide images if error on billboards * Update app/javascript/packs/billboard.js
This commit is contained in:
parent
4815661bad
commit
55997ffba8
2 changed files with 9 additions and 0 deletions
|
|
@ -279,6 +279,10 @@
|
|||
--indicator-bg: rgb(var(--grey-600));
|
||||
--indicator-color: rgb(var(--grey-200));
|
||||
|
||||
/* Indicators: Subtle */
|
||||
--indicator-subtle-bg: rgb(var(--grey-700));
|
||||
--indicator-subtle-color: rgb(var(--grey-200));
|
||||
|
||||
/* Indicators: Success */
|
||||
--indicator-success-bg: rgb(var(--green-700));
|
||||
--indicator-success-color: rgb(var(--green-50));
|
||||
|
|
|
|||
|
|
@ -29,6 +29,11 @@ async function generateBillboard(element) {
|
|||
|
||||
element.innerHTML = '';
|
||||
element.appendChild(generatedElement);
|
||||
element.querySelectorAll('img').forEach((img) => {
|
||||
img.onerror = function () {
|
||||
this.style.display = 'none';
|
||||
};
|
||||
});
|
||||
executeBBScripts(element);
|
||||
setupBillboardDropdown();
|
||||
// This is called here because the ad is loaded asynchronously.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue