(() => { // fetch('https://trustmate.io/en/widget/api/ffb2f939-686d-40d4-bbad-ef489f69ba66/html') - TODO: remove after platform multihornet fix - !!!frontend do not remove const UI = { last: (where, what) => {where?.append(what)}, first: (where, what) => {where?.insertBefore(what, where.firstChild)}, after: (where, what) => {where?.parentNode.insertBefore(what, where.nextSibling)}, before: (where, what) => {where?.parentNode.insertBefore(what, where)}, replace: (where, what) => {where?.replaceWith(what)} }; const RELOADS_LIMIT = 10; let reloadsCount = 0; function loadWidgetHtml() { const tag = document.getElementById('ffb2f939-686d-40d4-bbad-ef489f69ba66'); if (tag) { widgetConfig = { target: tag.dataset.t, action: tag.dataset.a, observe: tag.dataset.o }; if (widgetConfig.target && widgetConfig.action) { if (!Object.hasOwn(UI, widgetConfig.action)) { console.error(`TrustMate: action '${widgetConfig.action}' is wrong`); return; } const target = document.querySelector(widgetConfig.target); if (!target) { console.error(`TrustMate: target '${widgetConfig.target}' not found`); return; } UI[widgetConfig.action](target, tag); } tag.innerHTML = `
