Grammalecte  Check-in [ed9c7b39c4]

Overview
Comment:[fx] useless code
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fx | webext2
Files: files | file ages | folders
SHA3-256: ed9c7b39c44cbc4529a4cc56f400724a2ae478e847b1f909faed4db632fc9bf7
User & Date: olr on 2017-08-26 06:43:15
Other Links: branch diff | manifest | tags
Context
2017-08-26
10:15
[fx] code cleaning + keyboard shortcuts + main panel update check-in: 3f5e5e035c user: olr tags: fx, webext2
06:43
[fx] useless code check-in: ed9c7b39c4 user: olr tags: fx, webext2
2017-08-25
17:19
[fx] lexicographer and grammar checker: analyse selection via the context menu check-in: 79e6d10555 user: olr tags: fx, webext2
Changes

Modified gc_lang/fr/webext/background.js from [180d15c853] to [5671ec1d6b].

187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
        }
        case "getListOfTokens": {
            let xPort = dConnx.get(xTab.id);
            xPort.postMessage({sActionDone: "openLxgPanel", result: null, dInfo: null, bEnd: false, bError: false});
            xGCEWorker.postMessage({
                sCommand: "getListOfTokens",
                dParam: {sText: xInfo.selectionText},
                dInfo: {iReturnPort: xTab.id}}
            );
            break;
        }
        case "conjugueur_panel":
            let xConjWindow = browser.windows.create({
                url: browser.extension.getURL("panel/conjugueur.html"),
                type: "detached_panel",
                width: 710,







|
|







187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
        }
        case "getListOfTokens": {
            let xPort = dConnx.get(xTab.id);
            xPort.postMessage({sActionDone: "openLxgPanel", result: null, dInfo: null, bEnd: false, bError: false});
            xGCEWorker.postMessage({
                sCommand: "getListOfTokens",
                dParam: {sText: xInfo.selectionText},
                dInfo: {iReturnPort: xTab.id}
            });
            break;
        }
        case "conjugueur_panel":
            let xConjWindow = browser.windows.create({
                url: browser.extension.getURL("panel/conjugueur.html"),
                type: "detached_panel",
                width: 710,

Deleted gc_lang/fr/webext/panel/lexicographer.css version [8fcf23feab].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/* lxgpanel.css */

@import url("common.css");

header {
    background-color: hsl(0, 0%, 96%);
    padding: 10px 20px;
    border-bottom: 1px solid hsl(0, 0%, 90%);
    color: hsl(0, 0%, 0%);
}


body {
    background-color: hsl(0, 0%, 98%);
    font-family: "Trebuchet MS", sans-serif;
    overflow-x: hidden;
    color: hsl(0, 0%, 0%);
}



#tokens_list {
    padding: 50px 10px 10px 10px;
}

#tokens_list .paragraph {
    background-color: hsla(0, 0%, 90%, 1);
    padding: 10px;
    border-radius: 2px;
    margin: 10px 5px;
}

#tokens_list p {
    margin: 8px;
}
#tokens_list p.separator {
    margin: 20px 0;
    padding: 5px 50px;
    background-color: hsla(0, 0%, 75%, 1);
    color: hsla(0, 0%, 96%, 1);
    border-radius: 5px;
    text-align: center;
    font-size: 20px;
}
#tokens_list .token {
    margin: 8px;
}
#tokens_list ul {
    margin: 0 0 5px 40px;
}
#tokens_list b {
    background-color: hsla(150, 10%, 50%, 1);
    color: hsla(0, 0%, 96%, 1);
    padding: 2px 5px;
    border-radius: 2px;
    text-decoration: none;
}
#tokens_list b.WORD {
    background-color: hsla(150, 50%, 50%, 1);
}
#tokens_list b.ELPFX {
    background-color: hsla(150, 30%, 50%, 1);
}
#tokens_list b.UNKNOWN {
    background-color: hsla(0, 50%, 50%, 1);
}
#tokens_list b.NUM {
    background-color: hsla(180, 50%, 50%, 1);
}
#tokens_list b.COMPLEX {
    background-color: hsla(60, 50%, 50%, 1);
}
#tokens_list b.SEPARATOR {
    background-color: hsla(210, 50%, 50%, 1);
}
#tokens_list b.LINK {
    background-color: hsla(270, 50%, 50%, 1);
}
#tokens_list s {
    color: hsla(0, 0%, 60%, 1);
    text-decoration: none;
}
#tokens_list .textline {
    text-decoration: bold;
}

#tokens_list p.message {
    margin-top: 20px;
    padding: 10px 10px;
    background-color: hsla(240, 10%, 50%, 1);
    font-size: 18px;
    color: hsla(240, 0%, 96%, 1);
    border-radius: 3px;
    text-align: center;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































Deleted gc_lang/fr/webext/panel/lexicographer.html version [7c8a3411db].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE HTML>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="lxg_panel.css" />
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    </head>
    
    <body class="panel">
        <div style="position: fixed; width: 100%">
            <header>
                <div id="waiticon" class="spinner">
                  <div class="double-bounce1"></div>
                  <div class="double-bounce2"></div>
                </div>
                <h2>Grammalecte · Lexicographe</h2>
            </header>
        </div>

        <div id="tokens_list"></div>

    </body>
</html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































Deleted gc_lang/fr/webext/panel/lexicographer.js version [2b5d5c5245].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
71
72
73
74
75
// JavaScript



/*
    Actions
*/

function startWaitIcon () {
	document.getElementById("waiticon").hidden = false;
}

function stopWaitIcon () {
	document.getElementById("waiticon").hidden = true;
}

function clearList () {
	document.getElementById("tokens_list").textContent = "";
}

function addSeparator (sText) {
    if (document.getElementById("tokens_list").textContent !== "") {
        let xElem = document.createElement("p");
        xElem.className = "separator";
        xElem.textContent = sText;
        document.getElementById("tokens_list").appendChild(xElem);
    }
}

function addMessage (sClass, sText) {
    let xNode = document.createElement("p");
    xNode.className = sClass;
    xNode.textContent = sText;
    document.getElementById("tokens_list").appendChild(xNode);
}

function addParagraphElems (sJSON) {
    try {
        let xNodeDiv = document.createElement("div");
        xNodeDiv.className = "paragraph";
        let lElem = JSON.parse(sJSON);
        for (let oToken of lElem) {
            xNodeDiv.appendChild(createTokenNode(oToken));
        }
        document.getElementById("tokens_list").appendChild(xNodeDiv);
    }
    catch (e) {
        console.error(e.fileName + "\n" + e.name + "\nline: " + e.lineNumber + "\n" + e.message);
        console.error(sJSON);
    }
}

function createTokenNode (oToken) {
    let xTokenNode = document.createElement("div");
    xTokenNode.className = "token " + oToken.sType;
    let xTokenValue = document.createElement("b");
    xTokenValue.className = oToken.sType;
    xTokenValue.textContent = oToken.sValue;
    xTokenNode.appendChild(xTokenValue);
    let xSep = document.createElement("s");
    xSep.textContent = " : ";
    xTokenNode.appendChild(xSep);
    if (oToken.aLabel.length === 1) {
        xTokenNode.appendChild(document.createTextNode(oToken.aLabel[0]));
    } else {
        let xTokenList = document.createElement("ul");
        for (let sLabel of oToken.aLabel) {
            let xTokenLine = document.createElement("li");
            xTokenLine.textContent = sLabel;
            xTokenList.appendChild(xTokenLine);
        }
        xTokenNode.appendChild(xTokenList);
    }
    return xTokenNode;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<