Grammalecte  Check-in [3af265e2d8]

Overview
Comment:[fx] WebExt: adaptation to Chrome (browser=chrome)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256: 3af265e2d8e4dd41ebf26799c62b3f971b58c9ee80507e9c1fdb870de552db36
User & Date: olr on 2017-09-26 08:52:38
Other Links: manifest | tags
Context
2017-09-26
09:03
[fx] WebExt: adaptation to Chrome (browser=chrome) check-in: 0e89b6ede9 user: olr tags: trunk, fx
08:52
[fx] WebExt: adaptation to Chrome (browser=chrome) check-in: 3af265e2d8 user: olr tags: trunk, fx
08:25
[fx] WebExt: adaptation to Chrome (manifest.json) check-in: 4048828d5e user: olr tags: trunk, fx
Changes

Modified gc_lang/fr/webext/background.js from [cd0a23cfe8] to [f7c38c5176].

1
2
3
4
5
6
7
8






9
10
11
12
13
14
15
// Background 

"use strict";


function showError (e) {
    console.error(e.fileName + "\n" + e.name + "\nline: " + e.lineNumber + "\n" + e.message);
}








/*
    Worker (separate thread to avoid freezing Firefox)
*/
let xGCEWorker = new Worker("gce_worker.js");









>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Background 

"use strict";


function showError (e) {
    console.error(e.fileName + "\n" + e.name + "\nline: " + e.lineNumber + "\n" + e.message);
}

// Chrome don’t follow the W3C specification:
// https://browserext.github.io/browserext/
if (typeof(chrome) === "object") {
    var browser = chrome;
}


/*
    Worker (separate thread to avoid freezing Firefox)
*/
let xGCEWorker = new Worker("gce_worker.js");

Modified gc_lang/fr/webext/content_scripts/init.js from [52c46fcb6a] to [b49469f3a7].

9
10
11
12
13
14
15







16
17
18
19
20
21
22

"use strict";


function showError (e) {
    console.error(e.fileName + "\n" + e.name + "\nline: " + e.lineNumber + "\n" + e.message);
}








function createNode (sType, oAttr, oDataset=null) {
    try {
        let xNode = document.createElement(sType);
        Object.assign(xNode, oAttr);
        if (oDataset) {
            Object.assign(xNode.dataset, oDataset);







>
>
>
>
>
>
>







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

"use strict";


function showError (e) {
    console.error(e.fileName + "\n" + e.name + "\nline: " + e.lineNumber + "\n" + e.message);
}

// Chrome don’t follow the W3C specification:
// https://browserext.github.io/browserext/
if (typeof(chrome) === "object") {
    var browser = chrome;
}


function createNode (sType, oAttr, oDataset=null) {
    try {
        let xNode = document.createElement(sType);
        Object.assign(xNode, oAttr);
        if (oDataset) {
            Object.assign(xNode.dataset, oDataset);

Modified gc_lang/fr/webext/panel/main.js from [405aefbae4] to [f370e36795].

1
2
3
4
5
6
7
8






9
10
11
12
13
14
15
// Main panel

"use strict";


function showError (e) {
    console.error(e.fileName + "\n" + e.name + "\nline: " + e.lineNumber + "\n" + e.message);
}








/*
    Events
*/
window.addEventListener(
    "click",








>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Main panel

"use strict";


function showError (e) {
    console.error(e.fileName + "\n" + e.name + "\nline: " + e.lineNumber + "\n" + e.message);
}

// Chrome don’t follow the W3C specification:
// https://browserext.github.io/browserext/
if (typeof(chrome) === "object") {
    var browser = chrome;
}


/*
    Events
*/
window.addEventListener(
    "click",