mirror of
https://github.com/NohamR/BetterYGG.git
synced 2026-01-10 08:18:19 +00:00
9 lines
394 B
JavaScript
9 lines
394 B
JavaScript
var commentaryWrongLink = $('a:contains(Comm.)')[0];
|
|
var hrefArray = commentaryWrongLink.href.split('&');
|
|
var searchArray = document.location.search.split('&');
|
|
if (searchArray.includes('order=desc') && searchArray.includes('sort=comment')) {
|
|
hrefArray[hrefArray.length - 2] = 'order=asc';
|
|
}
|
|
hrefArray[hrefArray.length - 1] = 'sort=comment';
|
|
commentaryWrongLink.href = hrefArray.join('&');
|