Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
heavyboots opened this issue Dec 4, 2023 · 2 comments · Fixed by #43
Closed

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

heavyboots opened this issue Dec 4, 2023 · 2 comments · Fixed by #43

Comments

@heavyboots
Copy link

heavyboots commented Dec 4, 2023

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()
                }
              }
            }
          }
@nicolairathjen
Copy link

I have no clue how to do a Git edit

This might sound pedandic, but Git has no concept of "Editing". Instead, in Git you will make a new version, and git will track the changes between one version and the next.

In order to "Edit" this file you will have to:

  1. Create a copy of this repository on your own profile (This is called a fork)
  2. Make the changes you want to make
  3. Save the changes (In Git this is called committing)
  4. Create a Pull Request to this repository

The owner of this repository will then have the chance to review your changes, and accept, reject or ask for additional changes.

@heavyboots
Copy link
Author

OK, thanks. I'll give it a try if I get a chance. Apparently the deletion of the Back button is a permanent thing, so the solution should probably take that into account. Not to mention still being compatible with older versions that do have a back button…

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 a pull request may close this issue.

2 participants