27 lines
864 B
JavaScript
27 lines
864 B
JavaScript
// ==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);
|
|
})(); |