Commit 1fbd007e authored by yPhil's avatar yPhil

New image picking tactics: Removed debug symbols

parent d847e29a
......@@ -280,51 +280,25 @@ PTL.feed = {
var $tempDom = $('<null>').append($description);
console.log('item: (%s)', JSON.stringify(item));
if (item.image && typeof item.image.url !== 'undefined') {
// console.log('#### item.image: (%s)', feedHost);
imageUrl = item.image.url;
}
if (!imageUrl && typeof $tempDom.find('span a').attr('href') !== 'undefined') {
if (PTL.util.isImage($tempDom.find('span a').attr('href'))) {
imageUrl = $tempDom.find('span a').attr('href');
// console.log('#### $tempDom A: (%s)', feedHost);
}
}
if (!imageUrl && typeof $tempDom.find('img').attr('src') !== 'undefined') {
imageUrl = $tempDom.find('img').attr('src');
// console.log('#### $tempDom IMG: (%s)', feedHost);
}
if (typeof item.enclosures[0] !== 'undefined' && item.enclosures[0].url) {
// console.log('item.enclosures[0].type: (%s)', item.enclosures[0].type);
if (!imageUrl && imgTypes.indexOf(item.enclosures[0].type) > -1) {
imageUrl = item.enclosures[0].url;
// console.log('#### YESS: (%s)', feedHost);
}
// 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;
// }
// console.log('item.enclosures: %s (%s): %s', JSON.stringify(item.enclosures[0].type), feedUrl, item.enclosures[0].url.match(/\.(jpg|png|jpeg|gif)$/));
// if (item.enclosures[0].url.match(/\.(jpg|png|jpeg|gif)$/)) {
// imageUrl = item.enclosures[0].url;
// }
if (item.enclosures[0].url.match(/\.(ogg|mp3)$/)) {
$soundLink
.attr('href', item.enclosures[0].url)
......@@ -372,6 +346,8 @@ PTL.feed = {
$itemDiv.appendTo($feedItem);
$feedItem.appendTo($feedBody);
$tempDom.empty();
});
}).always(function() {
......
......@@ -70,12 +70,6 @@
</tr>
<tr>
<td><a href="/bower/jquery.hotkeys/jquery.hotkeys.js">jquery.hotkeys.js</a></td>
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
<td><a href="/bower/jquery.hotkeys/jquery.hotkeys.js">jquery.hotkeys.js</a></td>
</tr>
<tr>
<td><a href="/bower/remotestorage/release/remotestorage.js">remotestorage.js</a></td>
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
<td><a href="/bower/remotestorage/src/remotestorage.js">remotestorage.js</a></td>
......@@ -113,37 +107,43 @@
<tr>
<td><a href="/static/js/PTL.i18n.js">PTL.i18n.js</a></td>
<td><a href="http://www.gnu.org/licenses/gpl-3.0.html"> --- </a></td>
<td><a href="http://www.gnu.org/licenses/gpl-3.0.html">GNU-GPL-3.0</a></td>
<td><a href="/static/js/PTL.i18n.js">PTL.i18n.js</a></td>
</tr>
<tr>
<td><a href="/static/js/PTL.util.js">PTL.util.js</a></td>
<td><a href="http://www.gnu.org/licenses/gpl-3.0.html"> --- </a></td>
<td><a href="http://www.gnu.org/licenses/gpl-3.0.html">GNU-GPL-3.0</a></td>
<td><a href="/static/js/PTL.util.js">PTL.util.js</a></td>
</tr>
<tr>
<td><a href="/static/js/PTL.tab.js">PTL.tab.js</a></td>
<td><a href="http://www.gnu.org/licenses/gpl-3.0.html"> --- </a></td>
<td><a href="http://www.gnu.org/licenses/gpl-3.0.html">GNU-GPL-3.0</a></td>
<td><a href="/static/js/PTL.tab.js">PTL.tab.js</a></td>
</tr>
<tr>
<td><a href="/static/js/PTL.col.js">PTL.col.js</a></td>
<td><a href="http://www.gnu.org/licenses/gpl-3.0.html">GNU-GPL-3.0</a></td>
<td><a href="/static/js/PTL.col.js">PTL.col.js</a></td>
</tr>
<tr>
<td><a href="/static/js/PTL.feed.js">PTL.feed.js</a></td>
<td><a href="http://www.gnu.org/licenses/gpl-3.0.html"> --- </a></td>
<td><a href="http://www.gnu.org/licenses/gpl-3.0.html">GNU-GPL-3.0</a></td>
<td><a href="/static/js/PTL.feed.js">PTL.feed.js</a></td>
</tr>
<tr>
<td><a href="/static/js/PTL.dialog.js">PTL.dialog.js</a></td>
<td><a href="http://www.gnu.org/licenses/gpl-3.0.html"> --- </a></td>
<td><a href="http://www.gnu.org/licenses/gpl-3.0.html">GNU-GPL-3.0</a></td>
<td><a href="/static/js/PTL.dialog.js">PTL.dialog.js</a></td>
</tr>
<tr>
<td><a href="/static/js/PTL.sync.js">PTL.sync.js</a></td>
<td><a href="http://www.gnu.org/licenses/gpl-3.0.html"> --- </a></td>
<td><a href="http://www.gnu.org/licenses/gpl-3.0.html">GNU-GPL-3.0</a></td>
<td><a href="/static/js/PTL.sync.js">PTL.sync.js</a></td>
</tr>
......
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