Skip to content
Permalink
Browse files

Fix: Add missing browser action

Fix #3041
Close #3042
  • Loading branch information...
molant committed Sep 28, 2019
1 parent 24eacff commit 8857d73e6cfa0a2a826f5e2be6f0cff4dc75bc41
@@ -7,7 +7,7 @@
"timeout": "1m"
},
"browserslist": "last 2 chrome versions, last 2 firefox versions",
"bundleSize": 645000,
"bundleSize": 655000,
"description": "webhint browser extension",
"devDependencies": {
"@hint/hint-axe": "^4.1.5",
@@ -122,7 +122,7 @@
"build-release": "npm run clean && npm run build-release-packages",
"build-release-packages": "npm run build:assets && tsc --inlineSourceMap false --removeComments true && npm-run-all build-release:*",
"build-release:chromium": "webpack --env.release --env.design=fluent && web-ext build -s ./dist/bundle -a ./dist/chromium --overwrite-dest && npm run lint-bundle-size ./dist/chromium",
"build-release:firefox": "node scripts/drop-persistent-flag.js && webpack --env.release --env.design=photon && web-ext build -s ./dist/bundle -a ./dist/firefox --overwrite-dest && npm run lint-bundle-size ./dist/firefox",
"build-release:firefox": "node scripts/update-manifest.js && webpack --env.release --env.design=photon && web-ext build -s ./dist/bundle -a ./dist/firefox --overwrite-dest && npm run lint-bundle-size ./dist/firefox",
"build:assets": "cpx \"./{src,tests}/**/{!(*.ts),.!(ts),!(*.tsx),.!(tsx)}\" dist && npm-run-all prebuild:*",
"build:ts": "tsc -b",
"clean": "rimraf dist src/**/*.css.d.ts",
@@ -4,6 +4,8 @@ const manifest = require('../dist/bundle/manifest.json');

// Remove the "persistent" flag when building for Firefox to avoid a warning.
delete manifest.background.persistent;
// Remove the "browser_action" property to avoid displaying the logo close to the address bar on Firefox
delete manifest.browser_action;

const filename = path.resolve(`${__dirname}/../dist/bundle/manifest.json`);
const content = JSON.stringify(manifest, null, 2);
@@ -13,5 +15,6 @@ fs.writeFile(filename, content, (err) => {
throw err;
} else {
console.log(`Removed \`background.persistent=false\` from: ${filename}`);
console.log(`Removed \`browser_action\` from: ${filename}`);
}
});
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en-us">

<head>
<meta charset="utf-8">
<title>Run webhint from the devtools</title>
<style>
body {
background-color: #4700a3;
color: #fff;
width: 700px;
padding: 30px;
text-align: center;
}
p {
font-size: 1.5em;
}
.logo {
width: 400px;
}
</style>
</head>

<body>
<img class="logo" src="logo.svg" alt="webhint">
<p>Open DevTools and navigate to the Hints tab to start using webhint.</p>
<img src="devtools.png" alt="Developer Tools with the Hint tab in them">
</body>

</html>
Binary file not shown.
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 202 39.5"><style>.a{fill:#fff}</style><path d="M19.8 0C8.8 0 0 8.8 0 19.8s8.8 19.8 19.8 19.8 19.8-8.8 19.8-19.8C39.5 8.8 30.7 0 19.8 0zm17.4 19.8c0 9.6-7.8 17.5-17.5 17.5S2.3 29.4 2.3 19.7c0-9.6 7.8-17.5 17.5-17.5 9.6.1 17.4 7.9 17.4 17.6z" class="a"/><path d="M29.4 15.2L30 14l1.9-3.1-4.4 2.6c-.1.1-.2.1-.3.2-.5.5-.5 1.4 0 1.9.2.2.4.3.6.3.5.1 1 0 1.3-.3.1-.1.2-.2.3-.4z" class="a"/><path d="M28.8 16.9c-.3.1-.5.1-.8.1-1.2 0-2.2-1-2.2-2.2 0-.2 0-.5.1-.7-1.1-.7-2.4-1-3.6-.9-6.8 0-7.9 3.2-7.9 7.2.1 1 0 2-.5 2.9-.5.9-1.5 1.5-2.5 1.4-.4 0-1.9-.3-2-.7h.2c1.6 0 2.9-1.3 2.9-3v-.8h-1.4c-1 0-1.9.5-2.5 1.3C8 20.8 7 20.3 6 20.3H4.6v.6C4.6 22.6 6 24 7.8 24h.5c0 1 1.4 5 11.7 5 4 0 10-.7 10-8.3-.1-1.3-.5-2.7-1.2-3.8zm28.6 15.4l-6.3-16.7c-.3-.7.1-1.2.8-1.2h.9c.5-.1 1 .3 1.2.8l5.2 14.1 4.5-13.4c.1-.5.6-.8 1.1-.8h.8c.5 0 1 .3 1.1.8l4.5 13.4 5.2-14c.1-.5.6-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h-1.1c-.5 0-1-.3-1-.9-.1 0-.1-.1 0-.1zm9 0V15.4c0-.5.3-1 .9-1h1c.5 0 1 .3 1 .9v3.1c1-2.7 3.6-4.5 6.5-4.4 4 0 7.4 2.3 7.4 8.5v9.6c0 .5-.3 1-.9 1h-1c-.5 0-1-.3-1-.9v-9.8c0-4.5-2.4-6-4.7-6-2.1 0-6.3 1.5-6.3 7.5V32c0 .5-.3 1-.9 1h-1c-.5.1-1-.3-1-.8v-.1zm23.2-4.9V16.7h-2.6c-.4 0-.6-.2-.6-.6V15c0-.3.2-.6.4-.6h2.8l.6-4.8c0-.5.4-.9.9-.8h.5c.4-.1.8.3.9.7v5h5.4c.3 0 .6.2.6.5v1.2c0 .3-.2.6-.5.6h-5.5v10.8c0 2.7 1.3 3.6 2.7 3.6 1.4.1 2.5-.9 2.7-2.2v-.2c0-.2 0-.5-.1-.7 0-.5.1-.7.5-.7h1.3c.3 0 .6.2.7.5.1.4.1.8.1 1.2 0 2.6-1.8 4.6-5.3 4.6-2.8-.2-5.5-1.5-5.5-6.5z" class="a"/></svg>
@@ -9,8 +9,12 @@
"icons": {
"180": "icon.png"
},
"browser_action": {
"default_title": "webhint",
"default_popup": "browser-action/browser-action.html"
},
"default_locale": "en",
"description": "Run webhint in your browser.",
"description": "Quickly test your website to see if there are any issues with accessibility, browser compatibility, security, performance and more.",
"devtools_page": "devtools/devtools.html",
"manifest_version": 2,
"name": "webhint",

0 comments on commit 8857d73

Please sign in to comment.
You can’t perform that action at this time.