Fix to not embed images in content

This commit is contained in:
sienori 2019-02-24 05:08:26 +09:00
parent e19898db0f
commit a18a51c294
9 changed files with 9 additions and 48 deletions

36
package-lock.json generated
View file

@ -1137,12 +1137,6 @@
"uri-js": "^4.2.1"
}
},
"ajv-errors": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz",
"integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==",
"dev": true
},
"ajv-keywords": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz",
@ -5381,12 +5375,6 @@
"brorand": "^1.0.1"
}
},
"mime": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz",
"integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==",
"dev": true
},
"mime-db": {
"version": "1.36.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz",
@ -9739,30 +9727,6 @@
}
}
},
"url-loader": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/url-loader/-/url-loader-1.1.2.tgz",
"integrity": "sha512-dXHkKmw8FhPqu8asTc1puBfe3TehOCo2+RmOOev5suNCIYBcT626kxiWg1NBVkwc4rO8BGa7gP70W7VXuqHrjg==",
"dev": true,
"requires": {
"loader-utils": "^1.1.0",
"mime": "^2.0.3",
"schema-utils": "^1.0.0"
},
"dependencies": {
"schema-utils": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz",
"integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==",
"dev": true,
"requires": {
"ajv": "^6.1.0",
"ajv-errors": "^1.0.0",
"ajv-keywords": "^3.1.0"
}
}
}
},
"use": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",

View file

@ -26,7 +26,6 @@
"sass-loader": "^7.0.3",
"style-loader": "^0.21.0",
"uglifyjs-webpack-plugin": "^1.2.5",
"url-loader": "^1.1.2",
"webextension-polyfill": "^0.3.1",
"webpack": "^4.10.2",
"webpack-cli": "^3.0.1",

View file

@ -1,4 +1,5 @@
import React from "react";
import browser from "webextension-polyfill";
import { getSettings } from "src/settings/settings";
import "../styles/TranslateButton.scss";
@ -30,7 +31,9 @@ export default props => {
const { position, shouldShow } = props;
const buttonSize = parseInt(getSettings("buttonSize"));
const { top, left } = calcPosition();
const iconUrl = browser.extension.getURL("icons/512.png");
const buttonStyle = {
backgroundImage: `url(${iconUrl})`,
height: buttonSize,
width: buttonSize,
top: top + position.y,

View file

@ -4,7 +4,6 @@
background-color: #fff;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.08);
border-radius: 10%;
background-image: url("../../icons/512.png");
background-size: 75%;
background-repeat: no-repeat;
background-position: center;

View file

@ -47,6 +47,8 @@
}
],
"web_accessible_resources": ["icons/512.png"],
"commands": {
"_execute_browser_action": {
"description": "__MSG_openPopupDescription__",

View file

@ -53,6 +53,8 @@
}
],
"web_accessible_resources": ["icons/512.png"],
"commands": {
"_execute_browser_action": {
"description": "__MSG_openPopupDescription__"

View file

@ -47,6 +47,8 @@
}
],
"web_accessible_resources": ["icons/512.png"],
"commands": {
"_execute_browser_action": {
"description": "__MSG_openPopupDescription__",

View file

@ -74,11 +74,6 @@ const generalConfig = {
}
}
]
},
{
test: /\.(png|jpg|gif)$/,
loader: "url-loader",
options: {}
}
]
}

View file

@ -80,11 +80,6 @@ const generalConfig = {
}
}
]
},
{
test: /\.(png|jpg|gif)$/,
loader: "url-loader",
options: {}
}
]
}