From d5f6311bbc515b53c7ebdaf5e4ac14505366e457 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Tue, 7 May 2019 19:32:03 -0700 Subject: [PATCH] Fixed: Added support for new loom domain name --- app/embeds/Loom.js | 2 +- app/embeds/Loom.test.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/embeds/Loom.js b/app/embeds/Loom.js index e1cf6afa..bb2a9853 100644 --- a/app/embeds/Loom.js +++ b/app/embeds/Loom.js @@ -2,7 +2,7 @@ import * as React from 'react'; import Frame from './components/Frame'; -const URL_REGEX = /^https:\/\/(www\.)?useloom.com\/(embed|share)\/(.*)$/; +const URL_REGEX = /^https:\/\/(www\.)?(use)?loom.com\/(embed|share)\/(.*)$/; type Props = { url: string, diff --git a/app/embeds/Loom.test.js b/app/embeds/Loom.test.js index 27181466..6a62a5db 100644 --- a/app/embeds/Loom.test.js +++ b/app/embeds/Loom.test.js @@ -6,6 +6,9 @@ const { Loom } = embeds; describe('Loom', () => { const match = Loom.ENABLED[0]; test('to be enabled on share link', () => { + expect( + 'https://www.loom.com/share/55327cbb265743f39c2c442c029277e0'.match(match) + ).toBeTruthy(); expect( 'https://www.useloom.com/share/55327cbb265743f39c2c442c029277e0'.match( match @@ -14,6 +17,9 @@ describe('Loom', () => { }); test('to be enabled on embed link', () => { + expect( + 'https://www.loom.com/embed/55327cbb265743f39c2c442c029277e0'.match(match) + ).toBeTruthy(); expect( 'https://www.useloom.com/embed/55327cbb265743f39c2c442c029277e0'.match( match