[PR #784] [MERGED] Remove nag for mobile version of pve #215

Closed
opened 2025-09-09 19:44:39 -05:00 by giteasync · 0 comments

📋 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: mainHead: patch-1


📝 Commits (3)

  • fb351ce feat: remove nag for mobile version of pve
  • 88a964e fix: use same -s operator as previous script instead of -f
  • 27736ae Merge 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.

Link: https://github.com/community-scripts/ProxmoxVE/issues/6588#issuecomment-3162673938

Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No breaking changes – Existing functionality remains intact.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

🔍 Code & Security Review (X in brackets)

  • Follows Code_Audit.md & CONTRIBUTING.md guidelines
  • Uses correct script structure (AppName.sh, AppName-install.sh, AppName.json)
  • No hardcoded credentials

📋 Additional Information (optional)

The script removes this subscription nag
image

The script itself works on two sed commands.
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 sed commands 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.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVED/pull/784 **Author:** [@Buco7854](https://github.com/Buco7854) **Created:** 8/7/2025 **Status:** ✅ Merged **Merged:** 8/12/2025 **Merged by:** [@MickLesk](https://github.com/MickLesk) **Base:** `main` ← **Head:** `patch-1` --- ### 📝 Commits (3) - [`fb351ce`](https://github.com/community-scripts/ProxmoxVED/commit/fb351ce35fd3ea8c03624ce60debb7182a05f063) feat: remove nag for mobile version of pve - [`88a964e`](https://github.com/community-scripts/ProxmoxVED/commit/88a964e77184ba2f7728f5aeb93f45fa11ef0021) fix: use same -s operator as previous script instead of -f - [`27736ae`](https://github.com/community-scripts/ProxmoxVED/commit/27736ae1eb94154e96542d80f6c6d0fc430aef33) Merge branch 'community-scripts:main' into patch-1 ### 📊 Changes **1 file changed** (+5 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/pve/post-pve-install.sh` (+5 -1) </details> ### 📄 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) - [X] **Self-review completed** – Code follows project standards. - [X] **Tested thoroughly** – Changes work as expected. - [X] **No breaking changes** – Existing functionality remains intact. - [X] **No security risks** – No hardcoded secrets, unnecessary privilege escalations, or permission issues. --- ## 🛠️ Type of Change (**X** in brackets) - [ ] 🐞 **Bug fix** – Resolves an issue without breaking functionality. - [X] ✨ **New feature** – Adds new, non-breaking functionality. - [ ] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. - [ ] 🆕 **New script** – A fully functional and tested script or script set. - [ ] 🌍 **Website update** – Changes to website-related JSON files or metadata. - [ ] 🔧 **Refactoring / Code Cleanup** – Improves readability or maintainability without changing functionality. - [ ] 📝 **Documentation update** – Changes to `README`, `AppName.md`, `CONTRIBUTING.md`, or other docs. --- ## 🔍 Code & Security Review (**X** in brackets) - [X] **Follows `Code_Audit.md` & `CONTRIBUTING.md` guidelines** - [X] **Uses correct script structure (`AppName.sh`, `AppName-install.sh`, `AppName.json`)** - [X] **No hardcoded credentials** ## 📋 Additional Information (optional) The script removes this subscription nag <img width="694" height="850" alt="image" src="https://github.com/user-attachments/assets/be35a196-f685-45d7-bdd7-3087877bc6ff" /> The script itself works on two `sed` commands. 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 `sed` commands 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). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
giteasync added the pull-request label 2025-09-09 19:44:39 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: community-scripts/ProxmoxVED#215