Skip to content

Instantly share code, notes, and snippets.

@Endeer
Last active November 4, 2023 20:59
Show Gist options
  • Save Endeer/246c9aeb2051a022830a47ed3fed0c8d to your computer and use it in GitHub Desktop.
Save Endeer/246c9aeb2051a022830a47ed3fed0c8d to your computer and use it in GitHub Desktop.
Fix the new Mikrotik UI so that all sections are open and extended to the full width of the window as it used to be before.
// ==UserScript==
// @name Mikrotik WebFig Unfold Extend
// @version 1
// @grant none
// @include http://*/webfig/*
// ==/UserScript==
setInterval(
function() {
if(document.body.className.search(/(^| )serve-formToggle( |$)/) == -1) {
document.getElementById("formToggle").onclick();
}
var coll = document.getElementsByTagName("thead");
for(var i = 0; i < coll.length; i++) {
if(coll[i].className.search(/(^| )folded( |$)/) !== -1) {
coll[i].onclick();
}
}
},
1000
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment