Inline SVG Replacer

Replace all img tags with src as an SVG file into inline SVG tags

作者
mkpoli
日安装量
0
总安装量
4
评分
0 0 0
版本
0.1.1
创建于
2024-01-12
更新于
2024-01-12
许可证
CC0
适用于
所有网站

This a script that replaces all <img> tags that render svg images to inlined <svg> tags. The point of this is to allow advanced svg features like currentColor, so that we can modify the style of a website to change the color in svg, or do furthor modifications to the <svg> element. A common usage is for Dark Readers, where they cannot change color of a svg for something such as math equations, but by this script, the dark reader then can correctly apply the inverted color.