Skip to content

Commit

Permalink
Fix reading node style in findParentSize
Browse files Browse the repository at this point in the history
  • Loading branch information
kepstin committed Oct 7, 2020
1 parent 2ed93ba commit edc05b0
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 @@ -3,7 +3,7 @@
// @name:ja pixivサムネイルを改善する
// @namespace https://www.kepstin.ca/userscript/
// @license MIT; https://spdx.org/licenses/MIT.html
// @version 20200917.1
// @version 20201007.1
// @updateURL https://raw.githubusercontent.com/kepstin/Fix-pixiv-thumbnails/master/Fix-pixiv-thumbnails.user.js
// @description Stop pixiv from cropping thumbnails to a square. Use higher resolution thumbnails on Retina displays.
// @description:ja 正方形にトリミングされて表示されるのを防止します。Retinaディスプレイで高解像度のサムネイルを使用します。
Expand Down Expand Up @@ -142,7 +142,7 @@
let size = Math.max(node.getAttribute("width"), node.getAttribute("height"));
if (size > 0) { return size; }

size = Math.max(cssPx(node.style.width, node.style.height));
size = Math.max(cssPx(node.style.width), cssPx(node.style.height));
if (size > 0) { return size; }

e = e.parentElement;
Expand Down

0 comments on commit edc05b0

Please sign in to comment.