summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorSheogorath2020-02-10 17:41:47 +0100
committerSheogorath2020-02-10 17:45:43 +0100
commit45cc1325fba562777348814fa095ca7c66e2fcf7 (patch)
tree159c1e5ff141c7081b0d9ac22b2efef82e16afbf /public
parent2a28c832fcc448e12dff0dcf210d5614965cf66a (diff)
Fix revision redirect to index page
The revision view had a bug that clicking on a list entry would redirect the user back to the index page instead of providing the revision diff. This was cased by the baseurl which is now used as reference for hrefs. Therefore when clicking on the `href="#"` this was actually pointing at `<baseurl>#` which is usually the index page. This patch simply removes the href from the list items and therefore the link functionality. This fixes the whole problem by removing 9 characters from our source code. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
Diffstat (limited to 'public')
-rw-r--r--public/js/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 6ba174a5..de3c8a6d 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -1103,7 +1103,7 @@ function parseRevisions (_revisions) {
revisionList.html('')
for (var i = 0; i < revisions.length; i++) {
var revision = revisions[i]
- var item = $('<a href="#" class="list-group-item"></a>')
+ var item = $('<a class="list-group-item"></a>')
item.attr('data-revision-time', revision.time)
if (lastRevision === revision.time) item.addClass('active')
var itemHeading = $('<h5 class="list-group-item-heading"></h5>')