improve copykitku patch hook
This commit is contained in:
parent
8175a5e8b1
commit
acfb99b684
|
@ -4,16 +4,18 @@
|
||||||
|
|
||||||
module.exports = function patchHook(patchContent) {
|
module.exports = function patchHook(patchContent) {
|
||||||
[
|
[
|
||||||
|
[/(?:youtube-|yt-?)dl\.org/g, 'haruhi.download'],
|
||||||
[/youtube_dl/g, 'haruhi_dl'],
|
[/youtube_dl/g, 'haruhi_dl'],
|
||||||
[/youtube-dl/g, 'haruhi-dl'],
|
[/youtube-dl/g, 'haruhi-dl'],
|
||||||
[/youtubedl/g, 'haruhidl'],
|
[/youtubedl/g, 'haruhidl'],
|
||||||
[/YoutubeDL/g, 'HaruhiDL'],
|
[/YoutubeDL/g, 'HaruhiDL'],
|
||||||
[/ytdl/g, 'hdl'],
|
[/ytdl/g, 'hdl'],
|
||||||
[/(?:youtube-|yt-?)dl\.org/g, 'haruhi.download'],
|
|
||||||
[/yt-dl/g, 'h-dl'],
|
[/yt-dl/g, 'h-dl'],
|
||||||
|
[/ydl/g, 'hdl'],
|
||||||
|
|
||||||
// prevent from linking to non-existent repository
|
// prevent from linking to non-existent repository
|
||||||
[/github\.com\/ytdl-org\/haruhi-dl/g, 'github.com/ytdl-org/youtube-dl'],
|
[/github\.com\/ytdl-org\/haruhi-dl/g, 'github.com/ytdl-org/youtube-dl'],
|
||||||
|
[/github\.com\/rg3\/haruhi-dl/g, 'github.com/ytdl-org/youtube-dl'],
|
||||||
// prevent changing the smuggle URLs (for compatibility with ytdl)
|
// prevent changing the smuggle URLs (for compatibility with ytdl)
|
||||||
[/__haruhidl_smuggle/g, '__youtubedl_smuggle'],
|
[/__haruhidl_smuggle/g, '__youtubedl_smuggle'],
|
||||||
].forEach(([regex, replacement]) => patchContent = patchContent.replace(regex, replacement));
|
].forEach(([regex, replacement]) => patchContent = patchContent.replace(regex, replacement));
|
||||||
|
|
Loading…
Reference in a new issue