Skip to content

Commit

Permalink
Update blog feed URL (#10001)
Browse files Browse the repository at this point in the history
  • Loading branch information
bershanskiy committed Oct 4, 2022
1 parent 7315358 commit 43db0b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/background/newsmaker.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {getBlogPostURL} from '../utils/links';
import {getBlogPostURL, NEWS_URL} from '../utils/links';
import {getDurationInMinutes} from '../utils/time';
import type {News} from '../definitions';
import {readSyncStorage, readLocalStorage, writeSyncStorage, writeLocalStorage} from './utils/extension-api';
Expand Down Expand Up @@ -106,7 +106,7 @@ export default class Newsmaker {

private static async getNews() {
try {
const response = await fetch(`https://darkreader.github.io/blog/posts.json`, {cache: 'no-cache'});
const response = await fetch(NEWS_URL, {cache: 'no-cache'});
const $news: Array<Omit<News, 'read' | 'url'> & {date: string}> = await response.json();
const readNews = await Newsmaker.getReadNews();
const displayedNews = await Newsmaker.getDisplayedNews();
Expand Down
1 change: 1 addition & 0 deletions src/utils/links.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {getUILanguage} from './locales';

export const BLOG_URL = 'https://darkreader.org/blog/';
export const NEWS_URL = 'https://darkreader.org/blog/posts.json';
export const DEVTOOLS_DOCS_URL = 'https://github.com/darkreader/darkreader/blob/main/CONTRIBUTING.md';
export const DONATE_URL = 'https://opencollective.com/darkreader/donate';
export const GITHUB_URL = 'https://github.com/darkreader/darkreader';
Expand Down

0 comments on commit 43db0b0

Please sign in to comment.