From f228c8fce7aa92c5379de2b869b75ba2fc19b0af Mon Sep 17 00:00:00 2001 From: Jeremy Mahieu Date: Mon, 6 Apr 2020 14:18:24 +0200 Subject: [PATCH] Remove unnecessary function tiktok plugin --- js/plugins.js | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/js/plugins.js b/js/plugins.js index 8297762..038f260 100644 --- a/js/plugins.js +++ b/js/plugins.js @@ -564,30 +564,24 @@ plugins.factory('userPlugins', function() { if (match) { return function() { + fetch("https://www.tiktok.com/oembed?url=" + url) + .then(function(response) { + return response.json(); + }) + .then(function(data) { + // separate the HTML into content and script tag + var scriptIndex = data.html.indexOf("