Grammalecte  Check-in [2cc328babf]

Overview
Comment:[fx] WebExt: update button and menu for textareas
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256: 2cc328babfe52496fea087bf780e055beed6be7044d839d04cb2d3baf9223ab3
User & Date: olr on 2017-09-07 08:36:41
Original Comment: [fx] update button and menu for textareas
Other Links: manifest | tags
Context
2017-09-08
13:07
[fx] WebExt: add “Fira Sans” as equivalent to “Trebuchet MS” check-in: 5bedb9b401 user: olr tags: fx, trunk
2017-09-07
08:36
[fx] WebExt: update button and menu for textareas check-in: 2cc328babf user: olr tags: fx, trunk
08:02
[fx] WebExt: update help check-in: 6b206fd62d user: olr tags: fx, trunk
Changes

Modified gc_lang/fr/webext/content_scripts/menu.css from [6770b05fc9] to [bd88a8dc39].

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




/*
    CSS
    Menu for Grammalecte
*/

.grammalecte_menu_main_button {
    position: absolute;
    margin: -17px 0 0 -16px;
    border-radius: 16px;
    background-color: hsla(210, 50%, 50%, .5);
    background-image:  url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAA3XAAAN1wFCKJt4AAAJHElEQVRYha3Xa3BTVQLA8XPOvWmebdq8bhJSkhaoS3n0QbE81BVwBsFVXn24uwLuzjjuKAiIzA5dZmdERwfZod11x/0idXdGFIsiuIOLjjq7gpbWlpY06SNtQ5ImadM8m0fzuPeesx+SYnkIZWfvx+TO/f3PPck59wJwnwdECAIAkEwiBs+/+rcPn//rF7FVP3/sYQAAoCiavt/rUfeFQwQJwVAiFuNnDh1rHaGMOwcmonll1Y/UF3CBdpd92A4RogAh5P8eABFChGAolYjxb4+0nLLi4l2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Om0qKdFsfbn5i0turuoeeF00GuMRQhDjHzej27ZjQrIRQ5ZeqwLFr1WtWV/XbXNRhJBMMBDIW6lMffXBmy9tmfSNR0wlpaotLzdfvOvIZeHzra/trYvGbsfvGDArgrb19w3kc+HOFWs3bPWEk5JKSejLU2/s2+r3+6cNBoNi68ET//rOg2tuwsVZPBIMClbk3x3/yYDZEaO2/mE+5Li8sBC6P37n9f3BYCCh1WoLdhxqufD9OFy1cIGJk0lvHnkkFBJU54fPtR7dW383HAAA4J0+nH0ghBDGmAAICSAEFMjlwl1H3rnQGZZsMBnncfkyGZ1O3/ircZFQiK6WhT9tPbqnPhqL47vhAMzhsRxnn/GhQJAnAgCAHc+9cqQ3Lt8wT6dJy/ML6HQ6k7vtfjYSCtPV0sjZGRzeA59TwEwEz3EsAAAM9bRfWlmq4sY843kcz2GpWAwmfNlFploW/uTkay82zIyc3AMH4D5ezWZeNMbsthElnbQsr11f32MbozDBbHxqSlCZHz7benRPYyw38rng9xUwU4EoirZZr/Wr6GTvkpqHtjnGg8IqabDtvaN7G2PxOLkf/H8+KJoWAADAU79+7jdH3z1/USaV0gAAOJdXsVuP/wIS/4KXKIWf7AAAAABJRU5ErkJggg==');
    background-repeat: no-repeat;
    width: 32px;
    height: 32px;
    cursor: pointer;
    z-index: 100000000;
}

.grammalecte_menu {
    display: none;
    position: absolute;
    margin-left: -10px;
    border-radius: 5px;
    border: 3px solid hsl(210, 50%, 30%);
    box-shadow: 0px 0px 2px hsla(210, 10%, 10%, .5);

    font-family: "Trebuchet MS", "Liberation Sans", sans-serif;
}

.grammalecte_menu_item {
    padding: 3px 10px;
    background-color: hsl(210, 50%, 50%);
    font-size: 14px;
    color: hsl(210, 50%, 92%);
    cursor: pointer;
}
.grammalecte_menu_item:hover {
    background-color: hsl(210, 60%, 60%);
    color: hsl(210, 60%, 100%);
}

.grammalecte_menu_item_block {
    padding: 3px 10px;
    background-color: hsl(210, 50%, 50%);
    font-size: 14px;
    color: hsl(210, 50%, 92%);
    border-top: 1px solid hsl(210, 50%, 30%);;

}

.grammalecte_menu_button {
    display: inline-block;
    padding: 0 5px;
    margin-left: 10px;
    border-radius: 2px;
    background-color: hsl(210, 50%, 55%);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
    cursor: pointer;
}
.grammalecte_menu_button:hover {
    background-color: hsl(210, 60%, 60%);
}

.grammalecte_menu_header {
    padding: 2px 10px;
    background-color: hsl(210, 50%, 30%);



    font-size: 12px;
    font-variant-caps: small-caps;

    color: hsl(210, 50%, 90%);
    text-shadow: 0px 0px 2px hsla(210, 10%, 10%, .9);
    text-align: center;
}











|
|
|
|
|
|
|











>





|





|





|


|
>







|






|





>
>
>
|
<
>




>
>
>
>
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
/*
    CSS
    Menu for Grammalecte
*/

.grammalecte_menu_main_button {
    position: absolute;
    margin: -16px 0 0 -10px;
    border: 4px solid hsla(210, 80%, 30%, .5);
    border-radius: 16px;
    background-color: hsla(210, 80%, 50%, .5);
    width: 16px;
    height: 16px;
    text-align: center;
    cursor: pointer;
    z-index: 100000000;
}

.grammalecte_menu {
    display: none;
    position: absolute;
    margin-left: -10px;
    border-radius: 5px;
    border: 3px solid hsl(210, 50%, 30%);
    box-shadow: 0px 0px 2px hsla(210, 10%, 10%, .5);
    background-color: hsl(210, 50%, 30%);
    font-family: "Trebuchet MS", "Liberation Sans", sans-serif;
}

.grammalecte_menu_item {
    padding: 3px 10px;
    background-color: hsl(210, 50%, 40%);
    font-size: 14px;
    color: hsl(210, 50%, 92%);
    cursor: pointer;
}
.grammalecte_menu_item:hover {
    background-color: hsl(210, 60%, 45%);
    color: hsl(210, 60%, 100%);
}

.grammalecte_menu_item_block {
    padding: 3px 10px;
    background-color: hsl(210, 50%, 40%);
    font-size: 14px;
    color: hsl(210, 50%, 92%);
    border-top: 1px solid hsl(210, 50%, 30%);
    border-radius: 0 0 3px 3px;
}

.grammalecte_menu_button {
    display: inline-block;
    padding: 0 5px;
    margin-left: 10px;
    border-radius: 2px;
    background-color: hsl(210, 50%, 45%);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
    cursor: pointer;
}
.grammalecte_menu_button:hover {
    background-color: hsl(210, 60%, 50%);
}

.grammalecte_menu_header {
    padding: 2px 10px;
    background-color: hsl(210, 50%, 30%);
    background-image:  url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAC8UlEQVQ4jX3TbUgTcRwH8P89ddu5u9tt082aZmpFEU4tFz0QGTUwCi0heniR9MSUIKRaD0RvIlKigsooo+iNFa0XJYuwIjEK19OcDtPElsG0ktyp591t7u7+vUh7MPX3+vf5/n8/+P0BmKJIPUUVlh2rdVVeesWlzEybqg+bFOsoylnqPmNavGFfknV2Omu2Lvja3vxAURKJib3opHizu8riLK6gjRyuKgmoSoMRFENRUqfXTzvBGK62LC2uoFkOl4RhjQ8+qWt7dPNE3sbdp+2LXbsGe9qb4rIo/BfwFy6nWQ4ThWGNDzbcfu29dMDh2nHU7CypYNLmzTda0/L5cNuzmDQi/A4Y27k6eQxLI79wS/11D0AAMNvs6XT6ojVJjJEgTbMy2BT77xBMp09KcpaWV1uc41jQoi0NdUHfjeOO9WWn7AVF7s7n986SithPJGeupBh2PCSP/xxqxAp3eq6wuUV7Wc6MSZIEhA8vHjbfOe/OcW3zmAuKy+nUzAyD2bow8ODaEROFq8AyZ5WBYdEZXGqGxZ61HJV+9HYCJRbTNA0QBA40HWunaKN5dKg/DBKxeCIe09Th/m4MJwiMSZmLEzMQAABQRuNqgu8NYX3doTcMpvCkLbtQZ2AJkrPOZG1zlnY13T+Hy9EehY90h57eqcorcZ/lctZuMzAsOjLEqwNv66/6vZcPYRBC+C3cGaBxhSet2av1BpYgTTY7k5y2JPT41slIR6Axv8R9nnOs+4Pf+2r992uOxGVJwgAAAEINfgt3BGgsESWtWas1iGDyl+CT/u7WpvxNFRc4x7qtBoZFhSFejb7z1fq9NYfjsiT+cwcQavBruCOgU4SIGo18amuoq3Js3FNlynVtH385+s53ze+t8cRkURx3yMTTRBAEQVAUXbFlf3XystJKA2NExeFBdWASDAAA+MQACCEEmqbJ0b6PMC7JwhDU8YFHV5u9NZ64LErT/oW/63tPV6uJwmKoOND78u7Fg5NhAAD4CVbzY9cwrWQrAAAAAElFTkSuQmCC');
    background-repeat: no-repeat;
    background-position: 20% 50%;
    font-size: 16px;

    font-family: 'Yanone Kaffeesatz', "Liberation Sans Narrow", sans-serif;
    color: hsl(210, 50%, 90%);
    text-shadow: 0px 0px 2px hsla(210, 10%, 10%, .9);
    text-align: center;
}
.grammalecte_menu_footer {
    padding: 2px 10px;
    background-color: hsl(210, 50%, 30%);
}

Modified gc_lang/fr/webext/content_scripts/menu.js from [de706e9682] to [18505a0065].

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
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
"use strict";


class GrammalecteMenu {

    constructor (nMenu, xTextArea) {
        this.sMenuId = "grammalecte_menu" + nMenu;
        let xButton = createNode("div", {className: "grammalecte_menu_main_button"});
        xButton.onclick = () => { this.switchMenu(); };
        let xMenu = this._createMenu(xTextArea);
        this._insertAfter(xButton, xTextArea);
        this._insertAfter(xMenu, xTextArea);
    }

    _insertAfter (xNewNode, xReferenceNode) {
................................................................................
            xConjButtonWin.onclick = () => {
            	this.switchMenu();
            	xGrammalectePort.postMessage({sCommand: "openConjugueurWindow", dParam: null, dInfo: null});
            };
            xConjButton.appendChild(xConjButtonTab);
            xConjButton.appendChild(xConjButtonWin);
            // Create
            xMenu.appendChild(createNode("div", {className: "grammalecte_menu_header", textContent: "Grammalecte"}));
            xMenu.appendChild(xTFButton);
            xMenu.appendChild(xLxgButton);
            xMenu.appendChild(xGCButton);
            xMenu.appendChild(xConjButton);
            //xMenu.appendChild(createNode("img", {scr: browser.extension.getURL("img/logo-16.png")}));
            // can’t work, due to content-script policy: https://bugzilla.mozilla.org/show_bug.cgi?id=1267027
            xMenu.appendChild(createNode("div", {className: "grammalecte_menu_header"}));
            return xMenu;
        }
        catch (e) {
            showError(e);
        }
    }

    switchMenu () {
    	let xMenu = document.getElementById(this.sMenuId);
        xMenu.style.display = (xMenu.style.display == "block") ? "none" : "block";
    }
}







|







 







|






|












3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
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
"use strict";


class GrammalecteMenu {

    constructor (nMenu, xTextArea) {
        this.sMenuId = "grammalecte_menu" + nMenu;
        let xButton = createNode("div", {className: "grammalecte_menu_main_button", textContent: "•"});
        xButton.onclick = () => { this.switchMenu(); };
        let xMenu = this._createMenu(xTextArea);
        this._insertAfter(xButton, xTextArea);
        this._insertAfter(xMenu, xTextArea);
    }

    _insertAfter (xNewNode, xReferenceNode) {
................................................................................
            xConjButtonWin.onclick = () => {
            	this.switchMenu();
            	xGrammalectePort.postMessage({sCommand: "openConjugueurWindow", dParam: null, dInfo: null});
            };
            xConjButton.appendChild(xConjButtonTab);
            xConjButton.appendChild(xConjButtonWin);
            // Create
            xMenu.appendChild(createNode("div", {className: "grammalecte_menu_header", textContent: "GRAMMALECTE"}));
            xMenu.appendChild(xTFButton);
            xMenu.appendChild(xLxgButton);
            xMenu.appendChild(xGCButton);
            xMenu.appendChild(xConjButton);
            //xMenu.appendChild(createNode("img", {scr: browser.extension.getURL("img/logo-16.png")}));
            // can’t work, due to content-script policy: https://bugzilla.mozilla.org/show_bug.cgi?id=1267027
            xMenu.appendChild(createNode("div", {className: "grammalecte_menu_footer"}));
            return xMenu;
        }
        catch (e) {
            showError(e);
        }
    }

    switchMenu () {
    	let xMenu = document.getElementById(this.sMenuId);
        xMenu.style.display = (xMenu.style.display == "block") ? "none" : "block";
    }
}