diff --git a/remove_portainer_upgrade_button.js b/remove_portainer_upgrade_button.js new file mode 100644 index 0000000..0e74e25 --- /dev/null +++ b/remove_portainer_upgrade_button.js @@ -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); +})(); \ No newline at end of file