Skip to content

Commit

Permalink
Don't return src-less iframes as "spoiled videos".
Browse files Browse the repository at this point in the history
e.g. tweets get imbedded in iframes without a src.
  • Loading branch information
nolanw committed Oct 21, 2016
1 parent f1e7eac commit 134eb61
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions App/Web View Junk/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,12 @@ function interestingElementsAtPoint(x, y) {
}

var iframe = elementAtPoint.closest('iframe');
if (iframe.length && isSpoiled(iframe)) {
if (iframe.length > 0 && isSpoiled(iframe) && $(iframe).attr('src').length > 0) {
items.spoiledVideo = {
rect: rectOfElement(iframe),
URL: iframe.attr('src')
rect: rectOfElement(iframe),
URL: iframe.attr('src')
};
};
}

return items;
}

0 comments on commit 134eb61

Please sign in to comment.