diff --git a/innsida-custom-css.user.js b/innsida-custom-css.user.js index d747243..650cf21 100644 --- a/innsida-custom-css.user.js +++ b/innsida-custom-css.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Innsida - Custom CSS // @namespace http://tampermonkey.net/ -// @version 1.1 +// @version 1.2 // @description Custom CSS and Text Removal for innsida.ntnu.no // @author Magnus Børnes (magnborn@ntnu.no) // @match https://innsida.ntnu.no/* @@ -69,24 +69,6 @@ }); } - // New function to insert iframe - function insertIframe() { - setTimeout(function() { - var iframe = document.createElement('iframe'); - iframe.src = 'https://copilotstudio.microsoft.com/environments/Default-09a10672-822f-4467-a5ba-5bb375967c05/bots/cre79_ntnuCopilot/webchat?__version__=2'; - iframe.className = 'floating-iframe'; - - var targetElement = document.evaluate('/html/body/div/div[2]/aside', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; - if (targetElement) { - targetElement.appendChild(iframe); - console.log('XPath found: iframe inserted.'); - } else { - document.body.appendChild(iframe); - console.log('XPath not found: iframe added to body.'); - } - }, 2000); // Delay of 2000 milliseconds - } - // Function to observe DOM changes function observeDOMChanges() { var observer = new MutationObserver(function(mutations) {