From 585875cda7e3e261062a9b4f9d836bd8671b838e Mon Sep 17 00:00:00 2001 From: maTh <1645099+math-GH@users.noreply.github.com> Date: Sat, 30 Aug 2025 21:32:50 +0200 Subject: Global view: use generic CSS class to open panel (#7868) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- p/scripts/global_view.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'p/scripts') 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; -- cgit v1.2.3