diff --git a/.env b/.env index bfd410d0..c2b49cd1 100644 --- a/.env +++ b/.env @@ -2,7 +2,6 @@ API_URL=https://api.muetab.com/v2 SPONSORS_URL=https://sponsors.muetab.com GITHUB_URL=https://api.github.com -DDG_IMAGE_PROXY=https://external-content.duckduckgo.com/iu/?u= OPENSTREETMAP_URL=https://www.openstreetmap.org # Mue URLs diff --git a/src/config/.env b/src/config/.env deleted file mode 100644 index 678b118c..00000000 --- a/src/config/.env +++ /dev/null @@ -1,28 +0,0 @@ -# API URLs -API_URL=https://api.muetab.com/v2 -SPONSORS_URL=https://sponsors.muetab.com -GITHUB_URL=https://api.github.com -DDG_IMAGE_PROXY=https://external-content.duckduckgo.com/iu/?u= -OPENSTREETMAP_URL=https://www.openstreetmap.org - -# Mue URLs -WEBSITE_URL=https://muetab.com -PRIVACY_URL=https://muetab.com/privacy -BLOG_POST=https://blog.muetab.com/posts/version-7-0 -TRANSLATIONS_URL=https://docs.muetab.com/translations/ -WEBLATE_URL=https://hosted.weblate.org/projects/mue/mue-tab/ -REPORT_ITEM=https://github.com/mue/marketplace/issues/new?assignees=&labels=item+report&template=item-report.md&title=%5BItem+Report%5D+ -BUG_REPORT=https://github.com/mue/mue/issues/new?assignees=&labels=issue+report&template=bug-report.md&title=%5BBug%5D+ -DONATE_LINK=https://muetab.com/donate -SENTRY_DSN=https://430352fd4b174d688ebd82fc85c22c58@o1217438.ingest.sentry.io/6359480 -KNOWLEDGEBASE=https://support.muetab.com - -# Mue Info -ORG_NAME=mue -REPO_NAME=mue -EMAIL=hello@muetab.com -TWITTER_HANDLE=getmue -DISCORD_SERVER=zv8C9F8 -OPENCOLLECTIVE_USERNAME=mue - -VERSION=7.0.1 diff --git a/src/config/constants.js b/src/config/constants.js index b7d266d7..8472f6e9 100644 --- a/src/config/constants.js +++ b/src/config/constants.js @@ -2,7 +2,6 @@ export const API_URL = 'https://api.muetab.com/v2'; export const SPONSORS_URL = 'https://sponsors.muetab.com'; export const GITHUB_URL = 'https://api.github.com'; -export const DDG_IMAGE_PROXY = 'https://external-content.duckduckgo.com/iu/?u='; export const OPENSTREETMAP_URL = 'https://www.openstreetmap.org'; // Mue URLs @@ -27,4 +26,4 @@ export const TWITTER_HANDLE = 'getmue'; export const DISCORD_SERVER = 'zv8C9F8'; export const OPENCOLLECTIVE_USERNAME = 'mue'; -export const VERSION = '7.0.1'; +export const VERSION = '7.1.0'; diff --git a/src/features/background/Background.jsx b/src/features/background/Background.jsx index 0bfc965d..bb00cc78 100644 --- a/src/features/background/Background.jsx +++ b/src/features/background/Background.jsx @@ -44,14 +44,6 @@ export default class Background extends PureComponent { if (this.state.url !== '') { let url = this.state.url; - if ( - localStorage.getItem('ddgProxy') === 'true' && - this.state.photoInfo.offline !== true && - !this.state.url.startsWith('data:') - ) { - url = variables.constants.DDG_IMAGE_PROXY + this.state.url; - } - const photoInformation = document.querySelector('.photoInformation'); // just set the background diff --git a/src/features/background/components/Favourite.jsx b/src/features/background/components/Favourite.jsx index 002a9320..162bcd59 100644 --- a/src/features/background/components/Favourite.jsx +++ b/src/features/background/components/Favourite.jsx @@ -45,8 +45,7 @@ class Favourite extends PureComponent { let url = document .getElementById('backgroundImage') .style.backgroundImage.replace('url("', '') - .replace('")', '') - .replace(variables.constants.DDG_IMAGE_PROXY, ''); + .replace('")', ''); if (!url) { return; diff --git a/src/features/background/components/PhotoInformation.jsx b/src/features/background/components/PhotoInformation.jsx index 4a856170..ea4fa2d1 100644 --- a/src/features/background/components/PhotoInformation.jsx +++ b/src/features/background/components/PhotoInformation.jsx @@ -96,18 +96,13 @@ function PhotoInformation({ info, url, api }) { ); } - const ddgProxy = localStorage.getItem('ddgProxy') === 'true'; - // get resolution const img = new Image(); img.onload = (event) => { setWidth(event.target.width); setHeight(event.target.height); }; - img.src = - ddgProxy && !info.offline && !url.startsWith('data:') - ? variables.constants.DDG_IMAGE_PROXY + url - : url; + img.src = url; // info is still there because we want the favourite button to work if (localStorage.getItem('photoInformation') === 'false') { diff --git a/src/features/background/options/BackgroundOptions.jsx b/src/features/background/options/BackgroundOptions.jsx index d2958399..4f582b97 100644 --- a/src/features/background/options/BackgroundOptions.jsx +++ b/src/features/background/options/BackgroundOptions.jsx @@ -414,14 +414,6 @@ class BackgroundOptions extends PureComponent { )} /> - { - const { news, background_colour, img, display_name, description, name } = collection; +const Collection = ({ collection, collectionFunction }) => { + const { news, background_colour, img, display_name, description } = collection; const getStyle = () => { if (news) { return { backgroundColor: background_colour }; } + return { - backgroundImage: `linear-gradient(to left, #000, transparent, #000), url('${variables.constants.DDG_IMAGE_PROXY + img}')`, + backgroundImage: `linear-gradient(to left, #000, transparent, #000), url('${img}')`, }; }; @@ -38,16 +39,8 @@ const Collection = ({ collection, toggle, collectionFunction }) => { iconPlacement={'right'} /> )} - {/*