From c91b635132a3afb4e79a99317229cc716358b24c Mon Sep 17 00:00:00 2001 From: chylex <contact@chylex.com> Date: Sun, 1 Jul 2018 16:51:57 +0200 Subject: [PATCH] Fix TDPF_createCustomStyle's remove function depending on jQuery --- Resources/Scripts/plugins.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Resources/Scripts/plugins.js b/Resources/Scripts/plugins.js index 9bde979a..f7684832 100644 --- a/Resources/Scripts/plugins.js +++ b/Resources/Scripts/plugins.js @@ -43,12 +43,10 @@ element.id = "plugin-"+pluginObject.$id+"-"+Math.random().toString(36).substring(2, 7); document.head.appendChild(element); - var obj = { + return { insert: (rule) => element.sheet.insertRule(rule, 0), - remove: () => $(element).remove() + remove: () => element.remove(), + element: element }; - - obj.element = element; - return obj; }; })($TDP);