Skip to content

Commit

Permalink
Merge pull request #17 from gruberjl/master
Browse files Browse the repository at this point in the history
Fixed img query and expanded youtube support
  • Loading branch information
rkazakov authored Jun 12, 2018
2 parents c7a8730 + b89351d commit 2206788
Show file tree
Hide file tree
Showing 5 changed files with 6,105 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ module.exports = (html, options) => {
/* body */

/* img dimensions */
$('img:not(width):not(height)').each((index, element) => {
$('img:not([width]):not([height])').each((index, element) => {
const src = $(element).attr('src');
if (!src) {
return $(element).remove();
Expand Down Expand Up @@ -139,7 +139,7 @@ module.exports = (html, options) => {
});

/* youtube */
$('iframe[src*="http://www.youtube.com"]').each((index, element) => {
$('iframe[src*="http://www.youtube.com"],iframe[src*="https://www.youtube.com"],iframe[src*="http://youtu.be/"],iframe[src*="https://youtu.be/"]').each((index, element) => {
youtube = true;
const src = $(element).attr('src');
const width = $(element).attr('width');
Expand Down
Loading

0 comments on commit 2206788

Please sign in to comment.