Point the "View page source" link on the current page to its source file in the Phabricator git repository
- Group Reviewers
KDE Human Interface Guidelines
- R985:a7e86ef854a4: Point "View page source" link to the git source file of the current page
Fix some bugs, refactor and clean up code
- Remove unused code.
- Because the root path "/" points to "/index.html", we set the root path to always be "/index.html".
- Also exclude the "/" at the beginning of the newPath for non-root paths.
- Change the wording in the function description.
- Add return statement within the if block to end execution after "View page source" link is updated, and return the URL for the page's source file in Phabricator (useful for debugging).