StatusDetailLastLink

Adds a link for the Last Page on Status Detail pages.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name        StatusDetailLastLink
// @namespace   https://greasyfork.org/en/users/6503-turk05022014
// @version     1.0.20180104
// @description Adds a link for the Last Page on Status Detail pages.
// @match       https://worker.mturk.com/status_details/*
// @grant       none
// ==/UserScript==
$(function () {
	pages = $(".mturk-pagination").parent().data().reactProps;
	addPages();
});
function addPages() {
	if (pages.lastPage > pages.currentPage) {
		var link = $(".mturk-pagination a:contains('Next')").attr("href").replace(/page_number=\d+/, "page_number="+pages.lastPage);
		$(".mturk-pagination li:contains('Next')").after('<li class="page-item text-only"><a class="page-link" href="'+link+'">Last ››</a></li>');
	}
}