1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
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
|
-
+
-
+
+
+
+
+
-
+
+
+
+
+
-
-
-
+
+
+
+
|
/*
import { echo } from "mymodule";
/*
try {
console.log("BEFORE");
//var myhelpers = require('./grammalecte/helpers.js');
require(['./grammalecte/helpers.js'], function (foo) {
console.log("LOADING");
echo("It works! At last!");
echo("MODULE LOADED2");
});
console.log("AFTER");
}
catch (e) {
console.log("\n" + e.fileName + "\n" + e.name + "\nline: " + e.lineNumber + "\n" + e.message);
console.error(e);
}*/
}
*/
"use strict";
echo("VA TE FAIRE FOUTRE");
let gce = null; // module: grammar checker engine
let text = null;
let tkz = null; // module: tokenizer
let lxg = null; // module: lexicographer
let helpers = null;
|
123
124
125
126
127
128
129
130
131
132
133
134
135
|
132
133
134
135
136
137
138
139
|
-
-
-
+
-
-
-
|
function handleMessage (oRequest, xSender, sendResponse) {
console.log(`[background] received: ${oRequest.content}`);
sendResponse({response: "response from background script"});
}
browser.runtime.onMessage.addListener(handleMessage);
try {
loadGrammarChecker();
}
catch (e) {
console.error(e);
}
|