Skip to content

Commit

Permalink
background.js: if bad mime type, try to detect feeds by url ending (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
aureliendavid committed May 10, 2024
1 parent 5307b43 commit 2b6a3eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ function detectFeed(event) {
);
isfeed = true;
}
else if (header.value.toLowerCase() == 'text/xml' || header.value.toLowerCase() == 'application/xml' ) {
if (event.url.endsWith(".rss") || event.url.endsWith(".rss.xml") || event.url.endsWith(".atom") || event.url.endsWith(".atom.xml")) {
isfeed = true;
}
}
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

"manifest_version": 2,
"name": "RSSPreview",
"version": "3.31",
"version": "3.32",
"author": "Aurelien David",
"homepage_url": "https://github.com/aureliendavid/rsspreview",

Expand Down

0 comments on commit 2b6a3eb

Please sign in to comment.