mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-25 02:32:51 +02:00
create working extension with eslint configured locally
This commit is contained in:
+3
-11
@@ -1,12 +1,4 @@
|
||||
function getJSON(url, callback) {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.onload = function() {
|
||||
callback(this.responseText);
|
||||
};
|
||||
xhr.open("GET", url, true);
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
export function getUsefulContents(url, callback) {
|
||||
getJSON(url, data => callback(JSON.parse(data)));
|
||||
// we cant use export here
|
||||
function getUsefulContents(callback) {
|
||||
callback('Hello World');
|
||||
}
|
||||
Reference in New Issue
Block a user