Transparent standalone images

By default, the transparency of an image opened in a separate tab is indicated by a gray color. This script replaces it with a checkerboard pattern

< 腳本Transparent standalone images的回應

提問/評論

Konf作者
§
發表於:2025-07-07

v2.0.0 had false positives on pages where the image appears first. See https://dictionary.cambridge.org/

v3.0.0 would not work if there is an extension that inserts content, causing the image to no longer be the first element

Konf作者
§
發表於:2025-07-07

v3.0.1 affects the background of the first image found

Konf作者
§
發表於:2025-07-07
編輯:2025-07-07

Seems like the checkerboard render might remain distorted despite the render type selected. In that case need to tweak checkerboard size instead (or additionally)

Konf作者
§
發表於:2025-07-07

v4 todo

  • Apply changes without reloading the page;
  • Settings pane: render type, sizes and colors;
Konf作者
§
發表於:2025-07-07
編輯:2025-07-07

v4 description

*images examples here*

If the checkerboard looks blurry or distorted, you can tweak its appearance through the script manager dropdown menu
Konf作者
§
發表於:2025-07-16

On Tampermonkey the script doesn't work if there is Content‑Security‑Policy: sandbox on the page. However, Violentmonkey automatically makes a bypass for this and works, but then the default base64 checkerboard doesn't work with a Refused to load the image error in console, which seems to be another CSP restriction. Gradient checkerboard works alright. Page example:

https://static.wikia.nocookie.net/villains/images/8/84/The_Hillbilly.png/revision/latest?cb=20200519210028

發表回覆

登入以回覆

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址