Commit 9a2ede97 authored by yPhil's avatar yPhil

Merge branch 'bugs'

parents cd4a9b06 121225d8
Pipeline #45093 passed with stage
in 47 seconds
......@@ -283,12 +283,19 @@ PTL.feed = {
imageUrl = $tempDom.find('img').attr('src');
}
if (typeof item.image.url !== 'undefined') {
imageUrl = item.image.url;
}
// if (typeof item.image.url !== 'undefined') {
// console.log('whoa!: (%s)');
// }
if (typeof item.enclosures[0] !== 'undefined' && item.enclosures[0].url) {
// console.log('enclosures: (%s)', item.enclosures[0].url.match(/\.(jpg|png|jpeg|gif)$/));
// if (item.enclosures.url.match(/\.(jpg|png|jpeg|gif)$/)) {
// imageUrl = item.enclosures.url;
// }
if (item.enclosures[0].url.match(/\.(jpg|png|jpeg|gif)$/)) {
imageUrl = item.enclosures[0].url;
}
......
......@@ -4,44 +4,70 @@ PTL.prefs = (function() {
var newList =
[
{"name":"News",
{"name":"news",
"columns": [
[
{"url":"http://xkcd.com/rss.xml","type":"mixed","limit": 8}
{"url":"http://rss.nytimes.com/services/xml/rss/nyt/World.xml","type":"mixed","limit": 4}
],
[
{"url":"https://hackernoon.com/feed","type":"mixed","limit": 8},
{"url":"https://www.reddit.com/.rss","type":"photo","limit": 4}
{"url":"https://www.reddit.com/r/worldnews.rss","type":"mixed","limit": 8},
{"url":"http://feeds.reuters.com/Reuters/worldNews","type":"text","limit": 16},
],
[
{"url":"http://www.lemonde.fr/rss/une.xml","type":"photo","limit": 4},
{"url":"http://superphazed.tumblr.com/rss","type":"photo","limit": 8}
{"url":"http://www.lemonde.fr/rss/une.xml","type":"photo","limit": 4}
]
]
},
{"name":"Comics",
{"name":"tek",
"columns": [
[
{"url":"http://feeds.nature.com/nature/rss/current","type":"text","limit": 16},
{"url":"https://www.reddit.com/.rss","type":"mixed","limit": 4},
{"url":"http://feeds.feedburner.com/thechangelog","type":"mixed","limit": 4}
],
[
{"url":"https://hackernoon.com/feed","type":"mixed","limit": 8},
{"url":"http://feeds.feedburner.com/hackaday/LgoM/","type":"mixed","limit": 16},
{"url":"http://createdigitalmusic.com/feed/","type":"mixed","limit": 16},
],
[
{"url":"http://feeds.feedburner.com/hackaday/LgoM/","type":"photo","limit": 4}
]
]
},
{"name":"imgs",
"columns": [
[
{"url":"https://www.reddit.com/r/EarthPorn.rss","type":"photo","limit": 16},
{"url":"http://cabinporn.com/rss/","type":"photo","limit": 16},
{"url":"http://superphazed.tumblr.com/rss","type":"photo","limit": 8}
]
]
},
{"name":"Two",
{"name":"comics",
"columns": [
[
{"url":"http://phdcomics.com/gradfeed.php","type":"photo","limit": 4}
{"url":"http://xkcd.com/rss.xml","type":"photo","limit": 8}
],
[
{"url":"http://xkcd.com/rss.xml","type":"photo","limit": 8},
{"url":"http://superphazed.tumblr.com/rss","type":"photo","limit": 8}
{"url":"http://comicfeeds.chrisbenard.net/view/dilbert/default","type":"photo","limit": 8}
]
]
},
{"name":"music",
"columns": [
[
{"url":"http://createdigitalmusic.com/feed/","type":"mixed","limit": 16},
{"url":"http://phdcomics.com/gradfeed.php","type":"photo","limit": 4}
],
[
{"url":"https://www.rollingstone.com/music/rss","type":"photo","limit": 8},
{"url":"http://planet.linuxaudio.org/rss20.xml","type":"photo","limit": 8}
],
[
{"url":"https://dangerousminds.net/atom","type":"photo","limit": 8} ]
]
}
];
];
var defaults = {
'gallerySlideTransition': 'fade',
......
......@@ -127,7 +127,7 @@ PTL.sync = (function() {
remoteStorage.petrolette.write(feeds)
.then((data) => {
console.info('Writing to remote storage OK', data);
PTL.util.console(PTL.tr('Writing to remote storage OK'), 'success');
// PTL.util.console(PTL.tr('Writing to remote storage OK'), 'success');
})
.catch((err) => {
......
......@@ -46,7 +46,7 @@ function getFeed (urlfeed, callback) {
};
// var req = request (urlfeed);
var req = request (options);
var req = request(options);
var feedparser = new FeedParser ();
var feedItems = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment