Now also recognizing cursed amazon urls (that weird query shit)
This commit is contained in:
		@@ -138,6 +138,7 @@ fastify.post('/new', { newUrlSchema }, async (req, res) => {
 | 
				
			|||||||
 * @returns Standard shortening response if provider recognized or null
 | 
					 * @returns Standard shortening response if provider recognized or null
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
function checkKnownProviders(target) {
 | 
					function checkKnownProviders(target) {
 | 
				
			||||||
 | 
					    target=decodeURIComponent(target);
 | 
				
			||||||
    const youtubeVideoID = target.match(/(?:youtube(?:-nocookie)?\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/)
 | 
					    const youtubeVideoID = target.match(/(?:youtube(?:-nocookie)?\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/)
 | 
				
			||||||
    if (youtubeVideoID) {
 | 
					    if (youtubeVideoID) {
 | 
				
			||||||
        const shortcode = `yt/${youtubeVideoID[1]}`
 | 
					        const shortcode = `yt/${youtubeVideoID[1]}`
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user