Giter Club home page Giter Club logo

lemmy-keyboard-navigation's People

Contributors

aglidden avatar howdy-tsc avatar infinibytef4 avatar vmavromatis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

lemmy-keyboard-navigation's Issues

Option to allow configuring the shortcut keys

I suppose the keys can be edited relatively easily in the userscript. But would be really nice if the Chrome Extension had an option to configure the shortcut keys for each action.

Lemmy 0.19 currently only has a Next button; broke NextPage/PrevPage for me

I have no clue how to do a Git edit, but basically, this code fixes the issue. A little awkward but since we're looking for a case where the Next button may be either at index 0 or 1, this was all I could come up with off the top of my head.

~ Line 890

        case nextPageKey:
        case prevPageKey: {
          const pageButtons = Array.from(document.querySelectorAll(".paginator>button"));

          if (pageButtons && (document.getElementsByClassName('paginator').length > 0)) {
            var myNodeList;
            if (event.code === nextPageKey) {
              myNodeList = document.querySelectorAll(".paginator>.btn.btn-secondary");
              for (let i = 0; i < myNodeList.length; i++) {
                  if(myNodeList[i].textContent === "Next") {
                      myNodeList[i].click()
                }
              }
            } else {
              myNodeList = document.querySelectorAll(".paginator>.btn.btn-secondary");
              for (let i = 0; i < myNodeList.length; i++) {
                  if(myNodeList[i].textContent === "Prev") {
                      myNodeList[i].click()
                }
              }
            }
          }

Essential features not working in other languages than English

This script in the current form basically requires having the UI in English because it relies on the button text and assumes it being English.
For starters: In German there's no button labeled "Expand here" to expand images (it's labeled "hier erweitern") or navigating pages fails while searching for "Next" and "Prev" (instead of "Weiter" and "Zurück").

LemmyTools had the same problem: howdy-tsc/LemmyTools#35
And solved it this way: howdy-tsc/LemmyTools#40

Feature request: hjkl navigation

Hey, thanks for creating this! Any chance you could add hjkl navigation as used in Vim? I got used to it with RES and I kind of miss it.

Expand when going to next post

Would it be possible to provide an option to expand the new highlighted post when using keyboard navigation?

More specifically:

  • If the post that is being navigated away from is closed, don't expand the next post.
  • If the post that is being navigated away from is expanded, close the old post and expand the new.

Reply does not work

Navigating to a post and hitting reply does not focus the text editor as expected.

Hitting r on a comment shows its source instead.

(Using Firefox to browse lemmy.ml)

L is permanently bound to the second post in the list

To duplicate on firefox:

  1. unbind everything
  2. Push L

This is annoying because ctrl+L selects the URL bar, which I use to search, so whenever I'm on a lemmy page and use that shortcut, it jumps me to the second post.

New mlmym image viewer breaks "next post" functionality

(Tested on old.lemmy.world who uses mlmym 0.0.37)

When the selected post has an expanded image, it is not possible to select the next post, and the selected post will keep being selected.

Steps to reproduce:

  1. Go to an mlmym front page or community page
  2. Expand image
  3. Press "J" (or go to "next post" by other means)

Actual result: Selected post keeps being selected.
Expected result: Next post should be selected, and the current post should be unselected.

use RGBA instead of or in addition to hex

Setting the selected item hex code also accepts rgba values. So you can use something with a lot of transparency that will work on both light and dark modes. #49

for example, using rgba(39, 245, 238, 0.18):

screenshot on a light theme

screenshot on a dark theme

(Could probably even bring the alpha down to 0.1 with that shade of blue.)

This already works! using v 2.7. The only change needed is the explanatory text.

Can add a user hint that they can use https://rgbacolorpicker.com/ or any of a hundred other tools to find a color they like.

Setting a value with alpha as default across all sites would solve a lot of fiddling around. I do not see it is possible though?

Feature request: Expand/Collapse all Posts?

Out of all of RES, the thing I used most was shift+x to expand everything.

It made just scrolling through the page better.

Is it possible to implement this feature easily?

Feature Request: Add options for "Auto-Next on vote" and "Open Comments/Links in new tab by default"

Great userscript! I'd love to see a few options added to adjust the behavior of some keystrokes. Both are settings within RES I used to use, and could be optional checkboxes added.

One would be that it automatically scrolls to the next post if you vote. Example: Post 1 is expanded and you press KeyA to upvote, it automatically does the same action as KeyJ and scrolls down to post 2 after upvoting Post 1. This effectively lets you navigate and vote your way down the page with a single keystroke per post.

The second would be an option to toggle if you want to open Comments or Links in a new tab by default, instead of having to hold Shift. I almost never want to open a link in the existing tab, so I have to remember to hit shift each time to get it in a new tab.

Thanks!

How to bind to shift+button?

I'd like to bind expanding the expando to shift+j, and i'd also like to bind collapsing/shrinking the comments to that.

that way I can do almost everything with just j/k and shift+j, but I can't seem to set this up, unfortunately.

Light Mode Support

Currently the extensions seems to be focused on dark mode, resulting in very weird and impossible to read looks when using a light theme.

You can change the background color in settings, however manually changing that twice a day is bothersome, and that still leaves broken, illegible text.

Examples:

Light mode with dark background
image

Light mode with light background
image

lemmy.dbzer0.com not supported

Having recently migrated to lemmy.dbzer0.com, I see the Firefox add-on doesn't work on the lemmy.dbzer0.com domain. Could you please add it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.