mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-08-31 04:58:09 +00:00
Merge pull request #4 from Shik3i/alert-autofix-3
Potential fix for code scanning alert no. 3: Incomplete URL substring sanitization
This commit is contained in:
@@ -262,8 +262,8 @@
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const host = window.location.hostname.toLowerCase();
|
const host = window.location.hostname.toLowerCase();
|
||||||
const isYouTube = host.includes('youtube.com');
|
const isYouTube = host === 'youtube.com' || host.endsWith('.youtube.com');
|
||||||
const isTwitch = host.includes('twitch.tv');
|
const isTwitch = host === 'twitch.tv' || host.endsWith('.twitch.tv');
|
||||||
|
|
||||||
if (isYouTube) {
|
if (isYouTube) {
|
||||||
const ytButton = document.querySelector('.ytp-play-button');
|
const ytButton = document.querySelector('.ytp-play-button');
|
||||||
|
|||||||
Reference in New Issue
Block a user