Skip to content

Commit

Permalink
Correct comment about img tag preload size
Browse files Browse the repository at this point in the history
  • Loading branch information
kepstin committed Oct 31, 2020
1 parent aceec45 commit 924f488
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Fix-pixiv-thumbnails.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@
if (node.src === '' || node.src.startsWith('data:') || node.src.endsWith('transparent.gif')) { return }

// Terrible hack: A few pages on pixiv create temporary IMG tags to... preload? the images, then switch
// to setting a background on a DIV afterwards. This would be fine, except the temporary images don't
// have the height/width set.
// to setting a background on a DIV afterwards. This would be fine, except the temporary images have
// the height/width set to 0, breaking the hidpi image selection
if (
node.getAttribute('width') === '0' && node.getAttribute('height') === '0' &&
/^\/(?:discovery|(?:bookmark|mypixiv)_new_illust(?:_r18)?\.php)/.test(window.location.pathname)
Expand Down

0 comments on commit 924f488

Please sign in to comment.