Skip to content

Commit

Permalink
Merge branch '1.0.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
dauphine-dev committed Mar 12, 2023
2 parents 1132c03 + dba62ae commit 4a12079
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
10 changes: 8 additions & 2 deletions changes
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
1.0.16.200000002
1.0.16.40000000x
Fix missing thumbnail when comming from enclosure

1.0.16.30000000x
Keep background script alive with manifest V3

1.0.16.20000000x
same as 1.0.16.100000002
- with font size fix for sage_sc theme
- make v2 manisfest as the default one

1.0.16.100000002
1.0.16.10000000x
Ready for manifest V3
Display thumbnails in item description
Use 'fetch' request instead of 'XMLHttpRequest' request
Expand Down
9 changes: 7 additions & 2 deletions js/tools/feedParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const tagList = {
CAT: ['category'],
AUTHOR: ['author', 'dc:creator'],
PUBDATE: ['pubDate', 'published', 'dc:date', 'updated', 'a10:updated', 'lastBuildDate'],
THUMBNAIL: ['media:thumbnail'],
THUMBNAIL: ['enclosure', 'media:thumbnail'],
MEDIA_CONTENT: ['media:content']
};

Expand Down Expand Up @@ -286,8 +286,13 @@ class FeedParser { /*exported FeedParser*/

static _getThumbnail(itemText) {
if (!itemText) { return null; }

let thumbnail = null;
thumbnail = FeedParser._extractAttribute(itemText, tagList.THUMBNAIL, ['url']);
let medium = FeedParser._extractAttribute(itemText, tagList.THUMBNAIL, ['medium', 'type']);
if (medium && (medium == 'image' || medium.startsWith('image/'))) {
thumbnail = FeedParser._extractAttribute(itemText, tagList.THUMBNAIL, ['url']);
}

if (!thumbnail) {
let medium = FeedParser._extractAttribute(itemText, tagList.MEDIA_CONTENT, ['medium', 'type']);
if (medium && (medium == 'image' || medium.startsWith('image/'))) {
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"default_locale": "en",
"name": "Drop feeds",
"description": "__MSG_manExtensionDescription__",
"version": "1.0.16.300000002",
"version": "1.0.16.400000002",
"browser_specific_settings": {
"gecko": {
"id": "{42d52ade-6923-4f20-92d1-8db031269cc6}",
Expand Down
2 changes: 1 addition & 1 deletion manifestv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"default_locale": "en",
"name": "Drop feeds",
"description": "__MSG_manExtensionDescription__",
"version": "1.0.16.300000002",
"version": "1.0.16.400000002",
"browser_specific_settings": {
"gecko": {
"id": "{42d52ade-6923-4f20-92d1-8db031269cc6}",
Expand Down
2 changes: 1 addition & 1 deletion manifestv3.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"default_locale": "en",
"name": "Drop feeds",
"description": "__MSG_manExtensionDescription__",
"version": "1.0.16.300000003",
"version": "1.0.16.400000003",
"browser_specific_settings": {
"gecko": {
"id": "{42d52ade-6923-4f20-92d1-8db031269cc6}",
Expand Down

0 comments on commit 4a12079

Please sign in to comment.