Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions assets/javascript/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@
$contribList = $('.contrib-list-container'),
$search = $('#category-search');

// The address is about to change directory depth, which would make the
// browser re-resolve every relative URL on the page against the new
// path. Pin them to the URL the document was rendered against first.
$('a[href^="./"], form[action^="./"]').each(function() {
var name = (this.nodeName === 'FORM') ? 'action' : 'href',
resolver = document.createElement('a');

resolver.href = this.getAttribute(name);
this.setAttribute(name, resolver.href);
});
Comment on lines +73 to +79

phpbb.history.replaceUrl($this.attr('href'));

var getParents = function($self) {
Expand Down