Derpibooru - Sort by Score & No Scope

Removes pointless "scope" crap and adds a button to sort by rating.

Από την 29/09/2014. Δείτε την τελευταία έκδοση.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name        Derpibooru - Sort by Score & No Scope
// @namespace   Selbi
// @include     http*://*derpiboo.ru/*
// @include     http*://*derpibooru.org/*
// @version     1.1
// @description Removes pointless "scope" crap and adds a button to sort by rating.
// ==/UserScript==

if (window.top != window.self) return;

$("input[value='Go']").after('<input type="button" value="Score" id="sortbyscore"/>');

// Sort by Score
$("#sortbyscore").click(function() {
	var tags = document.getElementById("sbq").value;
	var newurl = "/search?utf8=%E2%9C%93&q=" + tags + "&min_score=&max_score=&sf=score&sd=desc&commit=Search";
	window.location.href = newurl;
});

// Remove "Scope" Crap
var allA = document.getElementsByTagName("a");
for (var i=0; i<allA.length; i++) {
	allA[i].href = allA[i].href.replace(/[?]{1}scope=scpe{1}\w+/g,"");
}

// Auto-scroll
//if ($("IMG#image_display.image_scaled").attr("height") > 907) {
//	$("IMG#image_display.image_scaled").attr("height", 907);
//}