mirror of
https://github.com/NohamR/BetterYGG.git
synced 2026-01-11 08:58:12 +00:00
[1.2] Fix the order by number of comment
This commit is contained in:
8
contentScripts/search/accessSearch.js
Normal file
8
contentScripts/search/accessSearch.js
Normal file
@@ -0,0 +1,8 @@
|
||||
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('&');
|
||||
Reference in New Issue
Block a user