Skip to content

Instantly share code, notes, and snippets.

@fahadysf
Created April 17, 2023 07:27
Show Gist options
  • Save fahadysf/3cada18e1fb50933f3bf09faac51dc8f to your computer and use it in GitHub Desktop.
Save fahadysf/3cada18e1fb50933f3bf09faac51dc8f to your computer and use it in GitHub Desktop.
UserScript to Hide Navigation Elements in XSOAR
// ==UserScript==
// @name Dashboard Cleaner
// @namespace http://tampermonkey.net/
// @version 0.1b
// @description Removes extra content from XSOAR dashboard
// @author Pandy Brijesh <email@email.com> & Fahad Yousuf <fahadysf@gmail.com>
// @match https://xsoar.fy.loc/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
let elementsClassList = [
"side-bar-container",
"tabs-menu-container",
"sub-menu",
"dashboard-tools",
"header-actions",
"app-footer"
];
var myFunctions = window.myFunctions = {};
myFunctions.updateGUI = function (classname) {
var elements = document.getElementsByClassName(classname);
while (elements.length > 0 && elements[0].style.display != 'none') {
console.log("Found the element");
var e = elements[0];
e.style.display = 'none';
//e.parentNode.removeChild(elements[0]);
};
}
setTimeout(function() {
elementsClassList.forEach(myFunctions.updateGUI);
}, 500);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment