* upload * shouldnt have been required * added gif buttons inside collections ( move, copy link, information )
11 lines
345 B
TypeScript
11 lines
345 B
TypeScript
/*
|
|
* Vencord, a Discord client mod
|
|
* Copyright (c) 2024 Vendicated and contributors
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*/
|
|
|
|
export function getUrlExtension(url: string) {
|
|
// tennor stuff is like //media.tenor/blah/blah
|
|
if (!url.startsWith("https:")) url = "https:" + url;
|
|
return new URL(url).pathname.split(".").pop();
|
|
}
|