fix: duckduckgo proxy no longer breaks offline mode

This commit is contained in:
David Ralph
2021-05-16 21:05:56 +01:00
parent 08bfa2772d
commit 2fd2e06bac
2 changed files with 12 additions and 12 deletions

View File

@@ -11,8 +11,8 @@
"license": "BSD-3-Clause",
"version": "5.0.1",
"dependencies": {
"@fontsource/lexend-deca": "^4.2.3",
"@fontsource/montserrat": "^4.2.2",
"@fontsource/lexend-deca": "^4.3.0",
"@fontsource/montserrat": "^4.3.0",
"@material-ui/core": "4.11.4",
"@material-ui/icons": "4.11.2",
"fetch-jsonp": "^1.1.3",
@@ -28,27 +28,27 @@
"weather-icons-react": "1.2.0"
},
"devDependencies": {
"@babel/core": "^7.14.0",
"@babel/eslint-parser": "^7.13.14",
"@babel/core": "^7.14.2",
"@babel/eslint-parser": "^7.14.2",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-transform-react-constant-elements": "^7.13.13",
"@babel/plugin-transform-runtime": "^7.13.15",
"@babel/preset-env": "^7.14.0",
"@babel/plugin-transform-runtime": "^7.14.2",
"@babel/preset-env": "^7.14.2",
"@babel/preset-react": "^7.13.13",
"babel-loader": "^8.2.2",
"babel-plugin-transform-react-class-to-function": "^1.2.2",
"copy-webpack-plugin": "^8.1.1",
"css-loader": "^5.2.4",
"eslint": "^7.25.0",
"eslint": "^7.26.0",
"eslint-config-react-app": "^6.0.0",
"eslint-webpack-plugin": "^2.5.4",
"html-webpack-plugin": "^5.3.1",
"mini-css-extract-plugin": "^1.6.0",
"sass": "^1.32.12",
"sass-loader": "^11.0.1",
"sass": "^1.32.13",
"sass-loader": "^11.1.1",
"source-map-loader": "^2.0.1",
"webpack": "^5.36.2",
"webpack-cli": "^4.6.0",
"webpack": "^5.37.0",
"webpack-cli": "^4.7.0",
"webpack-dev-server": "^3.11.2"
},
"scripts": {

View File

@@ -68,7 +68,7 @@ export default class Background extends React.PureComponent {
const backgroundImage = document.getElementById('backgroundImage');
if (this.state.url !== '') {
const url = (localStorage.getItem('ddgProxy') === 'true') ? window.constants.DDG_PROXY + this.state.url : this.state.url;
const url = (localStorage.getItem('ddgProxy') === 'true' && this.state.photoInfo.offline !== true) ? window.constants.DDG_PROXY + this.state.url : this.state.url;
const photoInformation = document.querySelector('.photoInformation');
// just set the background