SuprBay: The PirateBay Forum

Full Version: Fix sorting by upload date.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Sorting by date does not work correctly and it bothers me immensely. It only works for year and month, but not days.
I found a solution.
In the function sortlist(sr):
Add case for sr == 3 like so:

Code:
  if (sr == 5) {
    tinysort("li#st", { selector: "input", attr: "value" });
    return;
  } else if (sr == 3) {
    tinysort("li#st", {
      selector: "span:nth-child(" + sr + ")",
      forceStrings: true,
    });
  } else {
    tinysort("li#st", "span:nth-child(" + sr + ")");
  }
Found this problem a while back and suggested similar workaround.
Until site owner decides to fix it, here is a workaround.

Used this code for reference and added your code snippet.

Complete script is attached. Remove the '.txt' from filename, before using.

The code looks unsightly, but seems to work.
Hopefully there is a 'cleaner' way to override .js functions.

You'll need Greasemonkey (or tampermonkey/violetmonkey).

Or just use a TPB mirror site Wink

Hope this helps.
I had reported it as well!!
https://pirates-forum.org/Thread-Incorre...oaded-time
Thanks for the script, hope will be fixed soon