mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-12 15:08:45 +08:00
url check
This commit is contained in:
parent
3c6b324728
commit
c5dae38d70
1 changed files with 3 additions and 2 deletions
|
@ -1480,9 +1480,10 @@ export function setCustomBackground(value, nosave) {
|
|||
}
|
||||
value = value.trim();
|
||||
if (
|
||||
/(https|http):\/\/(www\.|).+\..+\/.+(\.png|\.gif|\.jpeg|\.jpg)/gi.test(
|
||||
(/(https|http):\/\/(www\.|).+\..+\/.+(\.png|\.gif|\.jpeg|\.jpg)/gi.test(
|
||||
value
|
||||
) ||
|
||||
) &&
|
||||
!/[<>]/.test(value)) ||
|
||||
value == ""
|
||||
) {
|
||||
config.customBackground = value;
|
||||
|
|
Loading…
Reference in a new issue