-
Notifications
You must be signed in to change notification settings - Fork 7
JS and merge script tweaks. #1
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ function format_chunk(index) { | |
| } | ||
|
|
||
| function find_chunk(n){ | ||
| return document.querySelector('a[name$="' + n + '"]'); | ||
| return document.querySelector('tr[id$="' + n + '"]'); | ||
| } | ||
|
|
||
| function change_chunk(offset) { | ||
|
|
@@ -27,7 +27,7 @@ function change_chunk(offset) { | |
| if (old_chunk) { | ||
| old_chunk.style.outline = ""; | ||
| } | ||
| old_chunk = new_chunk.parentNode.parentNode; | ||
| old_chunk = new_chunk; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I hadn't noticed that there was an ID. This is fine but you could just do
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Go with getElementById(). There wasn't an ID in 1.42, which you based your code on. I just did the minimal tweaks to your code to make it work with the latest rfcdiff, as the name attributes went away in 1.44. |
||
| old_chunk.style.outline = "1px solid red"; | ||
| window.location.hash = "#" + new_str; | ||
| window.scrollBy(0,-100); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My argument against this change is that it will not properly rewrite a script line that is an absolute URL to a site. Is your plan to instead have some sort of conditional statement in the script?