Skip to content

Commit

Permalink
chore: inline svg to save traffic
Browse files Browse the repository at this point in the history
  • Loading branch information
josStorer committed Mar 17, 2023
1 parent a1e36fe commit 9f8403c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ async function runWebpack(isWithoutKatex, callback) {
type: 'asset/inline',
},
{
test: /\.jpg$/,
test: /\.(jpg|svg)$/,
type: 'asset/inline',
},
],
Expand Down
7 changes: 2 additions & 5 deletions src/popup/Popup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import Browser from 'webextension-polyfill'
import PropTypes from 'prop-types'
import { config as toolsConfig } from '../content-script/selection-tools'
import wechatpay from './donation/wechatpay.jpg'
import bugmeacoffee from './donation/bugmeacoffee.svg'

function GeneralPart({ config, updateConfig }) {
const [balance, setBalance] = useState(null)
Expand Down Expand Up @@ -336,11 +337,7 @@ function Donation() {
target="_blank"
rel="nofollow noopener noreferrer"
>
<img
align="center"
alt="buymeacoffee"
src="https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-1.svg"
/>
<img alt="buymeacoffee" src={bugmeacoffee} />
</a>
<hr />
<>
Expand Down
Loading

0 comments on commit 9f8403c

Please sign in to comment.