Introduce JS for improved back button behaviour #121
No reviewers
Labels
No Label
bug
documentation
duplicate
enhancement
help wanted
invalid
maintenance
peach-lib
peach-network
peach-oled
peach-stats
peach-web
question
refactor
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: PeachCloud/peach-workspace#121
Loading…
Reference in New Issue
No description provided.
Delete Branch "js_back_button"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As discussed in #120, this PR adds JavaScript to override the default, hardcoded back button URL for every page of the UI.
If JavaScript is disabled in the browser, the underlying back button functionality continues to work in its usual slightly-quirky fashion :)
I wanted to encapsulate the JS in a separate file (
/static/back.js
) but I ran into a strange issue where the HTML beyond the<script src="/static/back.js"></script>
tag would not render (even though it was present in the source). Since the JS is simple and brief, I went with the fallback option of rendering it in a<script>
tag with Maud.hmm strange about the html bug. something about html syntax?
would also prefer separate js files to js within script tags in general, but also doesn't matter much since its a small amount of code
I tried tinkering with it for an hour and couldn't figure it out. Very weird.