mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-16 06:18:35 +02:00
Update eslint and .travis.yml (#259)
* simplify .travis.yml * Fixes error and warning from eslint 15:32 error Unnecessary escape character: \? no-useless-escape
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "8"
|
||||
node_js: stable
|
||||
sudo: false
|
||||
|
||||
script:
|
||||
- "npm test"
|
||||
|
||||
@@ -54,7 +54,7 @@ document.getElementById("button_background").addEventListener("click", () => {
|
||||
});
|
||||
|
||||
const inspectString = "inspect(document.querySelector('h1'))";
|
||||
document.getElementById("button_h1").addEventListener("click", function(){
|
||||
document.getElementById("button_h1").addEventListener("click", () => {
|
||||
browser.devtools.inspectedWindow.eval(inspectString)
|
||||
.then(handleResult);
|
||||
});
|
||||
|
||||
@@ -12,7 +12,7 @@ const AUTH_URL =
|
||||
const VALIDATION_BASE_URL="https://www.googleapis.com/oauth2/v3/tokeninfo";
|
||||
|
||||
function extractAccessToken(redirectUri) {
|
||||
let m = redirectUri.match(/[#\?](.*)/);
|
||||
let m = redirectUri.match(/[#?](.*)/);
|
||||
if (!m || m.length < 1)
|
||||
return null;
|
||||
let params = new URLSearchParams(m[1].split("#")[0]);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"version": "1.0.0",
|
||||
"description": "Example Firefox add-ons created using the WebExtensions API",
|
||||
"devDependencies": {
|
||||
"eslint": "^3.19.0"
|
||||
"eslint": "^4.4.1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
Reference in New Issue
Block a user