diff --git a/functions/album/[id].js b/functions/album/[id].js index 7ec77dc..11a0eea 100644 --- a/functions/album/[id].js +++ b/functions/album/[id].js @@ -147,6 +147,8 @@ const _cr = [ 'emVlIHN0dWRpb3M=', 'emluZGFnaSBtdXNpYw==', 'emVlNQ==', + 'Ym9sbHl3b29kIG11c2lj', + 'ZXNzZWw=', ].map(atob); const _isBlockedCopyright = (c) => !!c && _cr.some((s) => c.toLowerCase().includes(s)); diff --git a/functions/track/[id].js b/functions/track/[id].js index dbbb452..f57bb77 100644 --- a/functions/track/[id].js +++ b/functions/track/[id].js @@ -175,6 +175,8 @@ const _cr = [ 'emVlIHN0dWRpb3M=', 'emluZGFnaSBtdXNpYw==', 'emVlNQ==', + 'Ym9sbHl3b29kIG11c2lj', + 'ZXNzZWw=', ].map(atob); const _isBlockedCopyright = (c) => !!c && _cr.some((s) => c.toLowerCase().includes(s)); diff --git a/js/content-filter.ts b/js/content-filter.ts new file mode 100644 index 0000000..19537e0 --- /dev/null +++ b/js/content-filter.ts @@ -0,0 +1,19 @@ +const _cr = [ + 'emVl', + 'em1j', + 'emVlIG11c2lj', + 'emVlIGVudGVydGFpbm1lbnQ=', + 'emVlbA==', + 'Ym9sbHl3b29kIG11c2ljIGluZGlh', + 'emVlIHJlY29yZHM=', + 'emluZyBtdXNpYw==', + 'ZXRjIGJvbGx5d29vZA==', + 'emVlIHN0dWRpb3M=', + 'emluZGFnaSBtdXNpYw==', + 'emVlNQ==', + 'Ym9sbHl3b29kIG11c2lj', + 'ZXNzZWw=', +].map(atob); + +export const isBlockedCopyright = (c: string | null | undefined): boolean => + !!c && _cr.some((s) => c.toLowerCase().includes(s)); diff --git a/js/ui.js b/js/ui.js index d241ccc..f1a234d 100644 --- a/js/ui.js +++ b/js/ui.js @@ -51,21 +51,8 @@ import { createTrackFromSong, } from './tracker.js'; -const _cr = [ - 'emVl', - 'em1j', - 'emVlIG11c2lj', - 'emVlIGVudGVydGFpbm1lbnQ=', - 'emVlbA==', - 'Ym9sbHl3b29kIG11c2ljIGluZGlh', - 'emVlIHJlY29yZHM=', - 'emluZyBtdXNpYw==', - 'ZXRjIGJvbGx5d29vZA==', - 'emVlIHN0dWRpb3M=', - 'emluZGFnaSBtdXNpYw==', - 'emVlNQ==', -].map(atob); -const _isBlockedCopyright = (c) => !!c && _cr.some((s) => c.toLowerCase().includes(s)); +let _isBlockedCopyright = (_c) => false; +import('./content-filter.ts').then((m) => { _isBlockedCopyright = m.isBlockedCopyright; }).catch(() => {}); fontSettings.applyFont().catch(console.error); fontSettings.applyFontSize();