diff --git a/js/plugins.js b/js/plugins.js index 038f260..8218f78 100644 --- a/js/plugins.js +++ b/js/plugins.js @@ -558,12 +558,14 @@ plugins.factory('userPlugins', function() { * Very similar to twitter */ var tikTokPlugin = new UrlPlugin('TikTok', function(url) { - var regex = /^https?:\/\/(www\.)?tiktok\.com\/(.+)/i, + var regex = /^https?:\/\/(www\.)?tiktok\.com\/@(.+)\/video\/(.+)/i, match = url.match(regex); if (match) { return function() { + var element = this.getElement(); + fetch("https://www.tiktok.com/oembed?url=" + url) .then(function(response) { return response.json(); @@ -573,7 +575,6 @@ plugins.factory('userPlugins', function() { var scriptIndex = data.html.indexOf("