Better pornolab.net search - search by size, descending

Improve pornolab.net search and quick search forms so they always default to searching by size in descending order. 2020-06-21 01:41:17

// ==UserScript==
// @name        Better pornolab.net search - search by size, descending
// @namespace   Violentmonkey Scripts
// @match       http://pornolab.net/forum/*
// @grant       none
// @version     1.3
// @author      -
// @description Improve pornolab.net search and quick search forms so they always default to searching by size in descending order. 2020-06-21 01:41:17
// @run-at document-idle
// @inject-into page
// ==/UserScript==
$("form#quick-search").ready(function () {
  // improvements to quick search form
  $("form#quick-search").append("<input type='hidden' name='o' value='7' />"); // sort by size
  $("form#quick-search").append("<input type='hidden' name='s' value='2' />"); // sort descending
  $("form#quick-search input[name='max']").remove(); // prevents sorting of results
  $("form#quick-search input[name='to']").remove(); // no idea what it is, we don't need it
  $("form#quick-search").attr("action", "tracker.php"); // erm no idea how this even worked without that
});

$("div#search_opt").ready(function () {
  $("div#search_opt select#o").val(7); // sort by size when searching from main search form
});