Grammalecte  Diff

Differences From Artifact [4011ec8d5e]:

To Artifact [0f0dc58ca4]:


88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
            this.xButton.style.left = `${oCoord.left}px`;
        }
    }

    insertIntoPage () {
        this.bShadow = document.body.createShadowRoot || document.body.attachShadow;
        if (this.bShadow) {
            this.xShadowHost = oGrammalecte.createNode("div", { id: "grammalecte_menu_main_button_shadow", style: "width:0; height:0;" });
            this.xShadowRoot = this.xShadowHost.attachShadow({ mode: "open" });
            oGrammalecte.createStyle("content_scripts/menu.css", null, this.xShadowRoot);
            this.xShadowRoot.appendChild(this.xButton);
            document.body.appendChild(this.xShadowHost);
        }
        else {
            if (!document.getElementById("grammalecte_cssmenu")) {
                oGrammalecte.createStyle("content_scripts/menu.css", "grammalecte_cssmenu", document.head);
            }
            document.body.appendChild(this.xButton);
        }
    }
}







|













88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
            this.xButton.style.left = `${oCoord.left}px`;
        }
    }

    insertIntoPage () {
        this.bShadow = document.body.createShadowRoot || document.body.attachShadow;
        if (this.bShadow) {
            this.xShadowHost = oGrammalecte.createNode("div", { id: "grammalecte_menu_main_button_shadow_host", style: "width:0; height:0;" });
            this.xShadowRoot = this.xShadowHost.attachShadow({ mode: "open" });
            oGrammalecte.createStyle("content_scripts/menu.css", null, this.xShadowRoot);
            this.xShadowRoot.appendChild(this.xButton);
            document.body.appendChild(this.xShadowHost);
        }
        else {
            if (!document.getElementById("grammalecte_cssmenu")) {
                oGrammalecte.createStyle("content_scripts/menu.css", "grammalecte_cssmenu", document.head);
            }
            document.body.appendChild(this.xButton);
        }
    }
}