Skip to content

refactor(webserver): remove common.js, its MM_nbGroup handlers were no-ops - #93

Merged
ngosang merged 1 commit into
amule-org:masterfrom
ngosang:fix/remove-common-js
Jun 11, 2026
Merged

refactor(webserver): remove common.js, its MM_nbGroup handlers were no-ops#93
ngosang merged 1 commit into
amule-org:masterfrom
ngosang:fix/remove-common-js

Conversation

@ngosang

@ngosang ngosang commented Jun 11, 2026

Copy link
Copy Markdown
Member

common.js only held the Dreamweaver leftovers MM_nbGroup and its helper MM_findObj. Every remaining call site (the downloads and shared-files toolbars) passed empty strings as the swap-image arguments, so every code path ended up reassigning the src the image already had — the buttons have no hover/down image variants, and the onClick navigation (formCommandSubmit) reloads the page anyway. Pure dead weight.

  • Drop the onClick/onMouseOver/onMouseOut MM_nbGroup attributes from the 10 toolbar links (6 in amuleweb-main-dload.php, 4 in amuleweb-main-shared.php); the formCommandSubmit hrefs are untouched.
  • Remove the <script src="common.js"> tag from the 8 main pages.
  • Delete common.js and its entry in the CMake INSTALL list.

Verified against a running amuleweb: all pages load with a clean JS console, the toolbar buttons still submit their commands, and the toolbars render identically.

…o-ops

common.js only held the Dreamweaver leftovers MM_nbGroup and its helper
MM_findObj. Every remaining call site (the downloads and shared-files
toolbars) passed empty strings as the swap-image arguments, so every
code path ended up reassigning the src the image already had — the
buttons have no hover/down image variants, and the onClick navigation
(formCommandSubmit) reloads the page anyway. Pure dead weight.

- Drop the onClick/onMouseOver/onMouseOut MM_nbGroup attributes from
  the 10 toolbar links (6 in amuleweb-main-dload.php, 4 in
  amuleweb-main-shared.php); the formCommandSubmit hrefs are untouched.
- Remove the <script src="common.js"> tag from the 8 main pages.
- Delete common.js and its entry in the CMake INSTALL list.

Verified against a running amuleweb: all pages load with a clean JS
console, the toolbar buttons still submit their commands, and the
toolbars render identically.
@ngosang
ngosang merged commit 4125098 into amule-org:master Jun 11, 2026
8 checks passed
@ngosang
ngosang deleted the fix/remove-common-js branch June 11, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant