Index: gc_lang/fr/tb/content/overlay.js ================================================================== --- gc_lang/fr/tb/content/overlay.js +++ gc_lang/fr/tb/content/overlay.js @@ -3,11 +3,11 @@ "use strict"; const Cc = Components.classes; const Ci = Components.interfaces; -const Cu = Components.utils; +//const Cu = Components.utils; //const { require } = Cu.import("resource://gre/modules/commonjs/toolkit/require.js", {}); const { BasePromiseWorker } = ChromeUtils.import('resource://gre/modules/PromiseWorker.jsm', {}); const Task = ChromeUtils.import("resource://gre/modules/Task.jsm").Task; const prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService).getBranch("extensions.grammarchecker."); @@ -167,11 +167,10 @@ }).then(function (res) { that.setInfo("Nombre de paragraphes analysés : " + res); }, function (e) { that.setInfo("Erreur : " + e.message); console.error(e); - // Cu.reportError(e); }); }, createResultNode: function (xEditor, sParagraph, iParagraph, aGrammErr, aSpellErr) { let xResultNode = document.createElement("div"); xResultNode.setAttribute("id", "resnode" + iParagraph); @@ -196,11 +195,10 @@ xResultNode.textContent = "Erreur: " + res; }); } catch (e) { console.error(e); - // Cu.reportError(e); } }, fillResultNode: function (xResultNode, xEditor, sParagraph, iParagraph, aGrammErr, aSpellErr) { try { if (aGrammErr.length === 0 && aSpellErr.length === 0) { @@ -247,11 +245,10 @@ xResultNode.appendChild(xNode); } } catch (e) { console.error(e); - // Cu.reportError(e); xResultNode.textContent = "# Error: " + e.message; } }, _createNodeGCErrorDescription: function (xEditor, nError, dErr, iParagraph) { let xNodeDiv = document.createElement("div"); @@ -396,11 +393,10 @@ try { BrowserToolboxCustomizeDone(true); } catch (e) { console.error(e); - // Cu.reportError(e); } } }, clearPreview: function() { let xPreview = document.getElementById("grammalecte-errors"); @@ -413,11 +409,10 @@ xEditor.QueryInterface(Ci.nsIEditorStyleSheets); xEditor.addOverrideStyleSheet("chrome://grammarchecker/content/overlay.css"); } catch (e) { console.error(e); - // Cu.reportError(e); } } this.setInfo("[vide]"); }, setInfo: function (sText) { @@ -434,11 +429,10 @@ try { window.openDialog(sWhat, sName, sOptions); } catch (e) { console.error(e); - // Cu.reportError(e); } }, openInTabURL: function (sURL) { // method found in S3.Google.Translator try { @@ -450,21 +444,19 @@ xTabmail.openTab('contentTab', { contentPage: sURL }); } } catch (e) { console.error(e); - // Cu.reportError(e); } }, openInBrowserURL: function (sURL) { // method found in S3.Google.Translator try { openURL(sURL); } catch (e) { console.error(e); - // Cu.reportError(e); } }, onParseText: function (e) { this.parse(); }, @@ -528,11 +520,10 @@ try { oSpellControl.setExtensionDictFolder(sDicName, prefs.getBoolPref(sOptName)); } catch (e) { console.error(e); - // Cu.reportError(e); } } } @@ -548,11 +539,10 @@ this.reset(); } } catch (e) { console.error(e); - // Cu.reportError(e); } }, apply: function () { try { this.saveOptions(); @@ -566,11 +556,10 @@ iParagraph += 1; } } catch (e) { console.error(e); - // Cu.reportError(e); } }, saveOptions: function () { let oOptions = {}; for (let xNode of document.getElementsByClassName("option")) { @@ -610,11 +599,10 @@ } } } catch (e) { console.error(e); - // Cu.reportError(e); } }, resetProgressBar: function () { document.getElementById('progressbar').value = 0; document.getElementById('time_res').textContent = ""; @@ -887,11 +875,10 @@ const t1 = Date.now(); document.getElementById('time_res').textContent = this.getTimeRes((t1-t0)/1000); } catch (e) { console.error(e); - // Cu.reportError(e); } return sText; }, formatText: function (sText, sOptName) { let nCount = 0; @@ -905,11 +892,10 @@ sText = sText.replace(zRgx, sRep); } } catch (e) { console.error(e); - // Cu.reportError(e); } return [sText, nCount]; } }