mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-04-11 05:08:01 -05:00
[PR #784] [MERGED] Remove nag for mobile version of pve #215
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/community-scripts/ProxmoxVED/pull/784
Author: @Buco7854
Created: 8/7/2025
Status: ✅ Merged
Merged: 8/12/2025
Merged by: @MickLesk
Base:
main← Head:patch-1📝 Commits (3)
fb351cefeat: remove nag for mobile version of pve88a964efix: use same -s operator as previous script instead of -f27736aeMerge branch 'community-scripts:main' into patch-1📊 Changes
1 file changed (+5 additions, -1 deletions)
View changed files
📝
tools/pve/post-pve-install.sh(+5 -1)📄 Description
This commit removes the subscription nag for mobile version of pve. Basically this script adds new javascript inside the head section of the html (could not make it work in body probably related to the template). Then it waits for page to load and when it loads, everytime the body is changed, it tries to get the nag and click on close button so that it disappear. Once it found the nag it stops watching for new change in the body.
✍️ Description
This PR removes the subscription nag for mobile version of pve. Basically this script adds new javascript inside the head section of the html (could not make it work in body probably related to the template). Then it waits for page to load and when it loads, everytime the body is changed, it tries to get the nag and click on close button so that it disappear. Once it found the nag it stops watching for new change in the body.
🔗 Related PR / Issue
Link: https://github.com/community-scripts/ProxmoxVE/issues/6588#issuecomment-3162673938
✅ Prerequisites (X in brackets)
🛠️ Type of Change (X in brackets)
README,AppName.md,CONTRIBUTING.md, or other docs.🔍 Code & Security Review (X in brackets)
Code_Audit.md&CONTRIBUTING.mdguidelinesAppName.sh,AppName-install.sh,AppName.json)📋 Additional Information (optional)
The script removes this subscription nag

The script itself works on two
sedcommands.A cleanup command that removes the script if it already exists.
A command that creates the script in
/usr/share/pve-yew-mobile-gui/index.html.tpl.It adds new JavaScript inside the head section of the HTML (could not make it work in the body, probably related to the template). Then it waits for the page to load, and when it loads, every time the body is changed, it tries to get the nag and click the close button so that it disappears. Once it finds the nag, it stops watching for new changes in the body.
To make it work, I kept the previous nag script but added a check to see if the mobile index.html.tpl exists. If it does, it executes the
sedcommands to add the JavaScript.Once it's done, it encodes that in base64 format and decodes and executes it in the apt hook (needed to do that in order to avoid character escaping issues).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.