mirror of
https://github.com/Vendicated/Vencord.git
synced 2024-09-20 06:30:35 +00:00
Improve patch regex
This commit is contained in:
parent
5750a9cc48
commit
ecbd6ceb1d
1 changed files with 3 additions and 3 deletions
|
@ -66,7 +66,7 @@ function FilePreview({ attachment }: { attachment: Attachment; }) {
|
||||||
|
|
||||||
if (!previewBlobUrl) return null;
|
if (!previewBlobUrl) return null;
|
||||||
|
|
||||||
return previewBlobUrl && <div className={"file-viewer container"} id={`file-viewer-${stripLink(attachment.url)}`}><embed src={previewBlobUrl} className="file-viewer preview" title={attachment.filename} /></div>;
|
return <div className={"file-viewer container"} id={`file-viewer-${stripLink(attachment.url)}`}><embed src={previewBlobUrl} className="file-viewer preview" title={attachment.filename} /></div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function buildCss() {
|
async function buildCss() {
|
||||||
|
@ -151,8 +151,8 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: "Messages.IMG_ALT_ATTACHMENT_FILE_TYPE.format",
|
find: "Messages.IMG_ALT_ATTACHMENT_FILE_TYPE.format",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /function\((.+?)\)(.+Fragment.{0,500}newMosaicStyle.{0,500}?children:\[)(.+?\])/,
|
match: /newMosaicStyle,\i\),children:\[(?<=}=(\i);.+?)/,
|
||||||
replace: "function($1)$2$self.renderPreviewButton($1),$3"
|
replace: "$&$self.renderPreviewButton($1),"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue