if(window.PvInternals.services_client) { console.log("pv.me has loaded correctly") } // custom rules (() => { const pv = window.PvInternals; class PvmeRulesModal extends pv.components_pv_popup_pv_popup { constructor() { super(); this.innerHTML = ``; } } customElements.define("pvme-rules-modal", PvmeRulesModal); pv.Modal.RULES = "pvme-rules-modal"; let oldOpen = pv.PopupManager.open; pv.PopupManager.open = (e, ...t) => { if(pv.Modal.RULES == e) { let i = new PvmeRulesModal(); if (i == document.querySelector(e) && !i.querySelector("dialog").hasAttribute("closing")) return i.close(); document.body.append(i) i.open(...t) return i; } else { return oldOpen(e, ...t) } } class PvmeRules extends HTMLElement {} customElements.define("pvme-rules", PvmeRules); let g = document.querySelector("body > pv-header > div.left"); { let a = document.createElement("div"); a.className = "divider"; a.style.marginLeft = "20px"; g.appendChild(a); } { let a = document.createElement("pvme-rules"); a.innerHTML = `