add remove portainer button script
This commit is contained in:
1 parent
2864252334
commit
9164d87f0f
1 file changed
+27
@@ -0,0 +1,27 @@
|
||||
// ==UserScript==
|
||||
// @name Remove Portainer "Upgrade to Business Edition" Button
|
||||
// @namespace http://tampermonkey.net/
|
||||
// @version 1.0
|
||||
// @description Remove Portainer "Upgrade to Business Edition" Button
|
||||
// @author David Lo
|
||||
// @match *
|
||||
// @grant none
|
||||
// @run-at document-end
|
||||
// ==/UserScript==
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
const existCondition = setInterval(function() {
|
||||
const buttonTags = document.getElementsByTagName("button");
|
||||
const searchText = "Upgrade to Business Edition";
|
||||
let found;
|
||||
for (let i = 0; i < buttonTags.length; i++) {
|
||||
if (buttonTags[i].textContent == searchText) {
|
||||
found = buttonTags[i];
|
||||
found.remove()
|
||||
clearInterval(existCondition);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}, 500);
|
||||
})();
|
||||
Reference in new issue
Block a user