Remove Proxmox 5.1-7.x “No Valid Subscription” message

Update #1 (2021-12-22): As pointed out on this page a method that works from 5.1 up to latest 7.x. I've tested this with 7.1-8 successfully:
sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service

Introduction

In 2016, i already wrote a post about removing this message from older Proxmox 4.2 and newer, with the help of user comments.

Some time has passed and i have also updated my Homelab Proxmox instance and wondered, how i can remove this message from newer version.

I want to recapitulate the fact that, unless you run Proxmox for testing purposes, you should really consider buying a subscription for your production instances. This helps the developers maintaining and enhancing Proxmox and it's not really expensive.

If you want to try out Proxmox or using it for your testing environment, here is how you can deactivate the message.

TLDR; Deactivate it with a one liner

sed -i.bak "s/data.status !== 'Active'/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service

A bit more verbose?

During the last versions, the location of the file has changed. Here are the steps you can do on your own in a console environment without using sed.

~$ cd /usr/share/javascript/proxmox-widget-tookit
~$ cp proxmoxlib.js proxmoxlib.js.bak
~$ vim proxmoxlib.js

Search for Active until you find it in the following line

if (data.status !== 'Active') {

Change this to
if (false) {

Save the file and exit. Now restart the service in order to load the modified file.

systemctl restart pveproxy.service

Disclaimer

I am NOT responsible for any damage this change may do to your system. Use this Fix at YOUR OWN RISK!