aboutsummaryrefslogtreecommitdiff
path: root/p/scripts
diff options
context:
space:
mode:
authorGravatar maTh <1645099+math-GH@users.noreply.github.com> 2025-08-30 21:32:50 +0200
committerGravatar GitHub <noreply@github.com> 2025-08-30 21:32:50 +0200
commit585875cda7e3e261062a9b4f9d836bd8671b838e (patch)
tree0c069b4579aedcc37b26afdb1687f4eb95da312d /p/scripts
parentc55e2d317fde3f8f5ef16e41f6377e943e50c788 (diff)
Global view: use generic CSS class to open panel (#7868)
I found this todo and just did it. 😆 Changes proposed in this pull request: - use `open-class` instead of `.box a` How to test the feature manually: 1. go to global view 2. click on a box title link: it will open the whole category in the panel 3. click on a feed name: it will open the feed articles in the panel 4. nothing will be different for the user as before
Diffstat (limited to 'p/scripts')
-rw-r--r--p/scripts/global_view.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/p/scripts/global_view.js b/p/scripts/global_view.js
index 9ee9397cd..ebd65765c 100644
--- a/p/scripts/global_view.js
+++ b/p/scripts/global_view.js
@@ -84,8 +84,7 @@ function init_close_panel() {
}
function init_global_view() {
- // TODO: should be based on generic classes
- document.querySelectorAll('.box a').forEach(function (a) {
+ document.querySelectorAll('.open-panel').forEach(function (a) {
a.onclick = function (ev) {
load_panel(a.href);
return false;