Skip to content

Commit

Permalink
Update innsida-custom-css.user.js
Browse files Browse the repository at this point in the history
Fjerna Copilot-chaten
  • Loading branch information
magnborn authored Aug 25, 2025
1 parent b5116ce commit f601876
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions innsida-custom-css.user.js
Original file line number Diff line number Diff line change
@@ -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/*
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit f601876

Please sign in to comment.