Grammalecte  Diff

Differences From Artifact [d7c31535a7]:

To Artifact [92c60336fc]:


94
95
96
97
98
99
100
101

102
103
104
105

106
107
108

109
110
111

112
113
114
115
116
117

118
119
120
121

122
123
124

125
126
127

128
129
130
131
132
133
134
135
94
95
96
97
98
99
100

101




102



103



104

105
106
107
108

109




110



111



112

113
114
115
116
117
118
119







-
+
-
-
-
-
+
-
-
-
+
-
-
-
+
-




-
+
-
-
-
-
+
-
-
-
+
-
-
-
+
-







        let xButton = oGrammalecte.createNode("div", {className: "grammalecte_close_button", textContent: "×", title: "Fermer la fenêtre"});
        xButton.onclick = function () { this.hide(); }.bind(this);  // better than writing “let that = this;” before the function?
        return xButton;
    }

    insertIntoPage () {
        if (this.bShadow){
            this.oShadow.appendChild(
            oGrammalecte.createStyle("content_scripts/panel.css", null, this.oShadow);
                oGrammalecte.createNode("link", {rel: "stylesheet", type: "text/css", media: "all", href: oGrammalecte.sExtensionUrl + "content_scripts/panel.css"})
            );
            this.oShadow.appendChild(
                oGrammalecte.createNode("link", {rel: "stylesheet", type: "text/css", media: "all", href: oGrammalecte.sExtensionUrl + "content_scripts/panel_gc.css"})
            oGrammalecte.createStyle("content_scripts/panel_gc.css", null, this.oShadow);
            );
            this.oShadow.appendChild(
                oGrammalecte.createNode("link", {rel: "stylesheet", type: "text/css", media: "all", href: oGrammalecte.sExtensionUrl + "content_scripts/panel_lxg.css"})
            oGrammalecte.createStyle("content_scripts/panel_lxg.css", null, this.oShadow);
            );
            this.oShadow.appendChild(
                oGrammalecte.createNode("link", {rel: "stylesheet", type: "text/css", media: "all", href: oGrammalecte.sExtensionUrl + "content_scripts/panel_tf.css"})
            oGrammalecte.createStyle("content_scripts/panel_tf.css", null, this.oShadow);
            );
            this.oShadow.appendChild(this.xPanel);
            document.body.appendChild(this.oShadowPanel);
        } else {
            if (!document.getElementById("grammalecte_csspanel")){
                document.head.appendChild(
                oGrammalecte.createStyle("content_scripts/panel.css", "grammalecte_csspanel", document.head);
                    oGrammalecte.createNode("link", {id: "grammalecte_csspanel", rel: "stylesheet", type: "text/css", media: "all", href: oGrammalecte.sExtensionUrl + "content_scripts/panel.css"})
                );
                document.head.appendChild(
                    oGrammalecte.createNode("link", {rel: "stylesheet", type: "text/css", media: "all", href: oGrammalecte.sExtensionUrl + "content_scripts/panel_gc.css"})
                oGrammalecte.createStyle("content_scripts/panel_gc.css", null, document.head);
                );
                document.head.appendChild(
                    oGrammalecte.createNode("link", {rel: "stylesheet", type: "text/css", media: "all", href: oGrammalecte.sExtensionUrl + "content_scripts/panel_lxg.css"})
                oGrammalecte.createStyle("content_scripts/panel_lxg.css", null, document.head);
                );
                document.head.appendChild(
                    oGrammalecte.createNode("link", {rel: "stylesheet", type: "text/css", media: "all", href: oGrammalecte.sExtensionUrl + "content_scripts/panel_tf.css"})
                oGrammalecte.createStyle("content_scripts/panel_tf.css", null, document.head);
                );
            }
            document.body.appendChild(this.xPanel);
        }
    }

    show () {
        this.xPanel.style.display = "block";