diff --git a/icons/home.png b/icons/home.png new file mode 100644 index 0000000..eacc702 Binary files /dev/null and b/icons/home.png differ diff --git a/manifest.json b/manifest.json index 77bcc70..c055409 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "RSSPreview", - "version": "1.1", + "version": "1.2", "author": "Aurelien David", "homepage_url": "https://github.com/aureliendavid/rsspreview", @@ -29,7 +29,7 @@ } ], - "web_accessible_resources": ["preview.html", "preview.js", "preview.css", "rss.xsl", "icons/file.png"], + "web_accessible_resources": ["preview.html", "preview.js", "preview.css", "rss.xsl", "icons/*.png"], "permissions": ["", "webRequest", "webRequestBlocking"] diff --git a/preview.css b/preview.css index 81488fb..32e5771 100644 --- a/preview.css +++ b/preview.css @@ -114,3 +114,10 @@ a[href] img { width: 16px; margin-right: 3px; } + +.headerIcon { + vertical-align: bottom; + height: 25px; + width: 25px; + margin-right: 2px; +} \ No newline at end of file diff --git a/preview.js b/preview.js index d82cd48..47db891 100644 --- a/preview.js +++ b/preview.js @@ -106,6 +106,13 @@ function formatfilesizes() { } } + +function addfeedurl(url) { + + var h1 = document.getElementById("feedTitleText"); + h1.innerHTML += ' :: Feed URL'; +} + function main() { var query_string = location.search.substring(1).split("&"); @@ -122,6 +129,7 @@ function main() { formatdescriptions(); formatfilenames(); formatfilesizes(); + addfeedurl(feed_url); document.title = "RSSPreview: " + document.getElementById("feedTitleText").innerText; diff --git a/rss.xsl b/rss.xsl index 58e8a09..eb1043d 100644 --- a/rss.xsl +++ b/rss.xsl @@ -1,77 +1,82 @@ + xmlns:atom="http://www.w3.org/2005/Atom" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:rss1="http://purl.org/rss/1.0/" + exclude-result-prefixes="atom rdf" > - +
- - - -
- -

- - - - - - - - - - - -
-

-
- -
-
- - -
- - - (, ) -
- -
-
- -
-
- -
- +
+ + +
+ +

+ + + + + + + + + + + +
+

+
+ +
+
+ + +
+ + + (, ) +
+ +
+
+ +
+
+ +
+ - + +
diff --git a/rsspreview.js b/rsspreview.js index 3056bd2..c669121 100644 --- a/rsspreview.js +++ b/rsspreview.js @@ -10,10 +10,20 @@ } window.hasRun = true; - const rootName = document.getRootNode().documentElement.nodeName; + const rootName = document.getRootNode().documentElement.nodeName.toLowerCase(); - if (rootName == "rss" || rootName == "channel" || rootName == "feed") { + var isRSS1 = false; + if (rootName == "rdf" || rootName == "rdf:rdf") { + if (document.getRootNode().documentElement.attributes['xmlns']) { + isRSS1 = (document.getRootNode().documentElement.attributes['xmlns'].nodeValue.search('rss') > 0) + } + } + + + if ( rootName == "rss" || rootName == "channel" // rss2 + || rootName == "feed" // atom + || isRSS1 ) { var feed_url = window.location.href;