23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
try {
let xToolbar = createNode("div", {className: "grammalecte_wrapper_toolbar"});
let xConjButton = createNode("div", {className: "grammalecte_wrapper_button", textContent: "Conjuguer"});
xConjButton.onclick = () => { this.showConjButtons(); };
let xConjSection = createNode("div", {id: "grammalecte_wrapper_conj_section"+this.nWrapper, className: "grammalecte_wrapper_conj_section"});
let xConjButtonTab = createNode("div", {className: "grammalecte_wrapper_button2", textContent: ">Onglet"});
xConjButtonTab.onclick = function () {
xPort.postMessage({sCommand: "openConjugueurTab", dParam: null, dInfo: null});
this.hideConjButtons();
}.bind(this);
let xConjButtonWin = createNode("div", {className: "grammalecte_wrapper_button2", textContent: ">Fenêtre"});
xConjButtonWin.onclick = function () {
xPort.postMessage({sCommand: "openConjugueurWindow", dParam: null, dInfo: null});
this.hideConjButtons();
}.bind(this);
let xTFButton = createNode("div", {className: "grammalecte_wrapper_button", textContent: "Formater"});
xTFButton.onclick = function () {
oGrammalecte.createTFPanel();
oGrammalecte.oTFPanel.start(xTextArea);
oGrammalecte.oTFPanel.show();
};
let xLxgButton = createNode("div", {className: "grammalecte_wrapper_button", textContent: "Analyser"});
xLxgButton.onclick = function () {
oGrammalecte.createLxgPanel();
oGrammalecte.oLxgPanel.clear();
oGrammalecte.oLxgPanel.show();
oGrammalecte.oLxgPanel.startWaitIcon();
xPort.postMessage({
sCommand: "getListOfTokens",
dParam: {sText: xTextArea.value},
dInfo: {sTextAreaId: xTextArea.id}
});
};
let xGCButton = createNode("div", {className: "grammalecte_wrapper_button", textContent: "Corriger"});
xGCButton.onclick = function () {
oGrammalecte.createGCPanel();
oGrammalecte.oGCPanel.clear();
oGrammalecte.oGCPanel.show();
oGrammalecte.oGCPanel.start(xTextArea);
oGrammalecte.oGCPanel.startWaitIcon();
xPort.postMessage({
sCommand: "parseAndSpellcheck",
dParam: {sText: xTextArea.value, sCountry: "FR", bDebug: false, bContext: false},
dInfo: {sTextAreaId: xTextArea.id}
});
};
// Create
//xToolbar.appendChild(createNode("img", {scr: browser.extension.getURL("img/logo-16.png")}));
|
|
|
|
|
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
try {
let xToolbar = createNode("div", {className: "grammalecte_wrapper_toolbar"});
let xConjButton = createNode("div", {className: "grammalecte_wrapper_button", textContent: "Conjuguer"});
xConjButton.onclick = () => { this.showConjButtons(); };
let xConjSection = createNode("div", {id: "grammalecte_wrapper_conj_section"+this.nWrapper, className: "grammalecte_wrapper_conj_section"});
let xConjButtonTab = createNode("div", {className: "grammalecte_wrapper_button2", textContent: ">Onglet"});
xConjButtonTab.onclick = function () {
xGrammalectePort.postMessage({sCommand: "openConjugueurTab", dParam: null, dInfo: null});
this.hideConjButtons();
}.bind(this);
let xConjButtonWin = createNode("div", {className: "grammalecte_wrapper_button2", textContent: ">Fenêtre"});
xConjButtonWin.onclick = function () {
xGrammalectePort.postMessage({sCommand: "openConjugueurWindow", dParam: null, dInfo: null});
this.hideConjButtons();
}.bind(this);
let xTFButton = createNode("div", {className: "grammalecte_wrapper_button", textContent: "Formater"});
xTFButton.onclick = function () {
oGrammalecte.createTFPanel();
oGrammalecte.oTFPanel.start(xTextArea);
oGrammalecte.oTFPanel.show();
};
let xLxgButton = createNode("div", {className: "grammalecte_wrapper_button", textContent: "Analyser"});
xLxgButton.onclick = function () {
oGrammalecte.createLxgPanel();
oGrammalecte.oLxgPanel.clear();
oGrammalecte.oLxgPanel.show();
oGrammalecte.oLxgPanel.startWaitIcon();
xGrammalectePort.postMessage({
sCommand: "getListOfTokens",
dParam: {sText: xTextArea.value},
dInfo: {sTextAreaId: xTextArea.id}
});
};
let xGCButton = createNode("div", {className: "grammalecte_wrapper_button", textContent: "Corriger"});
xGCButton.onclick = function () {
oGrammalecte.createGCPanel();
oGrammalecte.oGCPanel.clear();
oGrammalecte.oGCPanel.show();
oGrammalecte.oGCPanel.start(xTextArea);
oGrammalecte.oGCPanel.startWaitIcon();
xGrammalectePort.postMessage({
sCommand: "parseAndSpellcheck",
dParam: {sText: xTextArea.value, sCountry: "FR", bDebug: false, bContext: false},
dInfo: {sTextAreaId: xTextArea.id}
});
};
// Create
//xToolbar.appendChild(createNode("img", {scr: browser.extension.getURL("img/logo-16.png")}));
|