Skip to content

Commit

Permalink
🎨 Optimize code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tw93 committed May 11, 2024
1 parent 0e1e57d commit f660956
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"endOfLine": "lf",
"bracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 120,
"printWidth": 140,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"semi": true,
Expand Down
1 change: 0 additions & 1 deletion bin/builders/BaseBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export default abstract class BaseBuilder {
}
}


async build(url: string) {
await this.buildAndCopy(url, this.options.targets);
}
Expand Down
11 changes: 7 additions & 4 deletions src-tauri/src/inject/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ function handleShortcut(event) {

// Judgment of file download.
function isDownloadLink(url) {
// prettier-ignore
const fileExtensions = [
'3gp', '7z', 'ai', 'apk', 'avi', 'bmp', 'csv', 'dmg', 'doc', 'docx', 'fla', 'flv', 'gif', 'gz', 'gzip',
'ico', 'iso', 'indd', 'jar', 'jpeg', 'jpg', 'm3u8', 'mov', 'mp3', 'mp4', 'mpa', 'mpg',
'mpeg', 'msi', 'odt', 'ogg', 'ogv', 'pdf', 'png', 'ppt', 'pptx', 'psd', 'rar', 'raw', 'rss', 'svg',
'swf', 'tar', 'tif', 'tiff', 'ts', 'txt', 'wav', 'webm', 'webp', 'wma', 'wmv', 'xls', 'xlsx', 'xml', 'zip',
'3gp', '7z', 'ai', 'apk', 'avi', 'bmp', 'csv', 'dmg', 'doc', 'docx',
'fla', 'flv', 'gif', 'gz', 'gzip', 'ico', 'iso', 'indd', 'jar', 'jpeg',
'jpg', 'm3u8', 'mov', 'mp3', 'mp4', 'mpa', 'mpg', 'mpeg', 'msi', 'odt',
'ogg', 'ogv', 'pdf', 'png', 'ppt', 'pptx', 'psd', 'rar', 'raw', 'rss',
'svg', 'swf', 'tar', 'tif', 'tiff', 'ts', 'txt', 'wav', 'webm', 'webp',
'wma', 'wmv', 'xls', 'xlsx', 'xml', 'zip', 'json', 'yaml', '7zip', 'mkv'
];
const downloadLinkPattern = new RegExp(`\\.(${fileExtensions.join('|')})$`, 'i');
return downloadLinkPattern.test(url);
Expand Down

0 comments on commit f660956

Please sign in to comment.