Index: gc_lang/fr/webext/content_scripts/init.js ================================================================== --- gc_lang/fr/webext/content_scripts/init.js +++ gc_lang/fr/webext/content_scripts/init.js @@ -137,34 +137,34 @@ this.createMenus(); }, createTFPanel: function () { if (this.oTFPanel === null) { - this.oTFPanel = new GrammalecteTextFormatter(this.sExtensionUrl, "grammalecte_tf_panel", "Formateur de texte", 760, 600, false); + this.oTFPanel = new GrammalecteTextFormatter("grammalecte_tf_panel", "Formateur de texte", 760, 600, false); //this.oTFPanel.logInnerHTML(); this.oTFPanel.insertIntoPage(); this.oTFPanel.adjustHeight(); } }, createLxgPanel: function () { if (this.oLxgPanel === null) { - this.oLxgPanel = new GrammalecteLexicographer(this.sExtensionUrl, "grammalecte_lxg_panel", "Lexicographe", 500, 700); + this.oLxgPanel = new GrammalecteLexicographer("grammalecte_lxg_panel", "Lexicographe", 500, 700); this.oLxgPanel.insertIntoPage(); } }, createGCPanel: function () { if (this.oGCPanel === null) { - this.oGCPanel = new GrammalecteGrammarChecker(this.sExtensionUrl, "grammalecte_gc_panel", "Grammalecte", 500, 700); + this.oGCPanel = new GrammalecteGrammarChecker("grammalecte_gc_panel", "Grammalecte", 500, 700); this.oGCPanel.insertIntoPage(); } }, createMessageBox: function () { if (this.oMessageBox === null) { - this.oMessageBox = new GrammalecteMessageBox(this.sExtensionUrl, "grammalecte_message_box", "Grammalecte"); + this.oMessageBox = new GrammalecteMessageBox("grammalecte_message_box", "Grammalecte"); this.oMessageBox.insertIntoPage(); } }, startGCPanel: function (xNode=null) { Index: gc_lang/fr/webext/content_scripts/message_box.js ================================================================== --- gc_lang/fr/webext/content_scripts/message_box.js +++ gc_lang/fr/webext/content_scripts/message_box.js @@ -8,13 +8,12 @@ "use strict"; class GrammalecteMessageBox { - constructor (sUrl, sId, sTitle) { + constructor (sId, sTitle) { this.sId = sId; - this.sUrl = sUrl; this.bShadow = document.body.createShadowRoot || document.body.attachShadow; if (this.bShadow){ this.oShadowPanel = oGrammalecte.createNode("div", {id: this.sId+"_shadow", style: "width:0;height:0;"}); this.oShadow = this.oShadowPanel.attachShadow({mode: "open"}); @@ -65,14 +64,14 @@ } insertIntoPage () { if (this.bShadow){ this.oShadow.appendChild( - oGrammalecte.createNode("link", {rel: "stylesheet", type: "text/css", media: "all", href: this.sUrl+"content_scripts/panel.css"}) + 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: this.sUrl+"content_scripts/message_box.css"}) + oGrammalecte.createNode("link", {rel: "stylesheet", type: "text/css", media: "all", href: oGrammalecte.sExtensionUrl + "content_scripts/message_box.css"}) ); this.oShadow.appendChild(this.xMessageBox); document.body.appendChild(this.oShadowPanel); } else { document.body.appendChild(this.xMessageBox); Index: gc_lang/fr/webext/content_scripts/panel.js ================================================================== --- gc_lang/fr/webext/content_scripts/panel.js +++ gc_lang/fr/webext/content_scripts/panel.js @@ -8,13 +8,12 @@ "use strict"; class GrammalectePanel { - constructor (sUrl, sId, sTitle, nWidth, nHeight, bFlexible=true) { + constructor (sId, sTitle, nWidth, nHeight, bFlexible=true) { this.sId = sId; - this.sUrl = sUrl; this.nWidth = nWidth; this.nHeight = nHeight; this.bFlexible = bFlexible; this.bShadow = document.body.createShadowRoot || document.body.attachShadow; @@ -98,20 +97,20 @@ } insertIntoPage () { if (this.bShadow){ this.oShadow.appendChild( - oGrammalecte.createNode("link", {rel: "stylesheet", type: "text/css", media: "all", href: this.sUrl+"content_scripts/panel.css"}) + 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"}) ); this.oShadow.appendChild( - oGrammalecte.createNode("link", {rel: "stylesheet", type: "text/css", media: "all", href: this.sUrl+"content_scripts/panel_gc.css"}) + oGrammalecte.createNode("link", {rel: "stylesheet", type: "text/css", media: "all", href: oGrammalecte.sExtensionUrl + "content_scripts/panel_lxg.css"}) ); this.oShadow.appendChild( - oGrammalecte.createNode("link", {rel: "stylesheet", type: "text/css", media: "all", href: this.sUrl+"content_scripts/panel_lxg.css"}) - ); - this.oShadow.appendChild( - oGrammalecte.createNode("link", {rel: "stylesheet", type: "text/css", media: "all", href: this.sUrl+"content_scripts/panel_tf.css"}) + oGrammalecte.createNode("link", {rel: "stylesheet", type: "text/css", media: "all", href: oGrammalecte.sExtensionUrl + "content_scripts/panel_tf.css"}) ); this.oShadow.appendChild(this.xPanel); document.body.appendChild(this.oShadowPanel); } else { document.body.appendChild(this.xPanel);