-
Notifications
You must be signed in to change notification settings - Fork 3
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
Auto expand fails in other languages than English #35
Comments
I've seen you comments under the various keyboard navigation scripts and those have the same problem: - const buttonText = event.code === nextPageKey ? "Next" : "Prev";
+ const buttonText = event.code === nextPageKey ? "Weiter" : "Zurück"; Comments are even worse with the singular state. case openCommentsKey:
if (event.shiftKey) {
+ try {
window.open(
- currentEntry.querySelector("a.btn[title$='Comments']").href,
+ currentEntry.querySelector("a.btn[title$='Kommentar']").href,
);
+ } catch (error) {
+ window.open(
+ currentEntry.querySelector("a.btn[title$='Kommentare']").href,
+ );
+ }
} else {
+ try {
- currentEntry.querySelector("a.btn[title$='Comments']").href,
+ currentEntry.querySelector("a.btn[title$='Kommentar']").click();
+ } catch (error) {
+ currentEntry.querySelector("a.btn[title$='Kommentare']").click();
+ }
}
break; There has to be a better way. |
Thank you for the reports and thank you for chiming in. Right now, Manipulating the DOM objects are limited and we are using what is being given to us with lemmy-ui. Im an amateur and doing this with my limited know how and learning a lot! If anyone has a better idea than me please help out. I admittedly made the function quickly with what seemed obvious. Perhaps there is something I am overlooking to make this work without the literally query all selector being required for functionality like this. We are doing a code clean up right now which will give me some time to pause and revaluate some functions as the script is going to look vastly different on 0.2 Thank you. |
The current implementation fails to find any expandable nodes if the language isn't English:
LemmyTools/lemmyTools.js
Line 471 in 111f1b8
E.g. German needs:
However, this seems like a really fragile way to do this.
The text was updated successfully, but these errors were encountered: