Skip to content

Commit 0a96351

Browse files
committed
Shortened app.urls.update init
1 parent 383c503 commit 0a96351

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

github/github-widescreen/github-widescreen.user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// @description:zh-TW 自動隱藏 GitHub 上引人注目的側面板
1414
// @author Adam Lui
1515
// @namespace https://github.com/adamlui
16-
// @version 2025.1.11.1
16+
// @version 2025.1.11.2
1717
// @license MIT
1818
// @icon https://github.githubassets.com/favicons/favicon.png
1919
// @match *://github.com/*
@@ -40,7 +40,7 @@
4040
}
4141
}
4242
app.urls.update = app.urls.greasyFork.replace('https://', 'https://update.')
43-
.replace(/(\d+)-?([a-z-]*)$/i, (_, id, name) => `${id}/${ !name ? 'script' : name }.meta.js`)
43+
.replace(/(\d+)-?([a-z-]*)$/i, (_, id, name) => `${id}/${ name || 'script' }.meta.js`)
4444

4545
// Register ABOUT menu command
4646
GM_registerMenuCommand('💡 About ' + app.name, async () => {

0 commit comments

Comments
 (0)