☰

Simpcity PervertMonkey

Infinite scroll [optional], Filter by Title and Uploader, Sort by Views

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Simpcity PervertMonkey
// @namespace    pervertmonkey
// @version      1.0.3
// @author       violent-orangutan
// @description  Infinite scroll [optional], Filter by Title and Uploader, Sort by Views
// @license      MIT
// @icon         https://www.google.com/s2/favicons?sz=64&domain=simpcity.cr
// @homepage     https://github.com/smartacephale/sleazy-fork#readme
// @homepageURL  https://sleazyfork.org/en/users/1253342-smartacephale
// @source       https://github.com/smartacephale/sleazy-fork
// @supportURL   https://github.com/smartacephale/sleazy-fork/issues
// @match        https://simpcity.cr/threads/*
// @match        https://simpcity.cr/watched/threads*
// @match        https://simpcity.cr/forums/*
// @match        https://simpcity.cr/account/bookmarks*
// @match        https://simpcity.cr/tags/*
// @require      https://cdn.jsdelivr.net/npm/[email protected]/dist/core/pervertmonkey.core.umd.js
// @grant        GM_addStyle
// @grant        unsafeWindow
// @run-at       document-end
// ==/UserScript==

var ___core = window.pervertmonkey.core || pervertmonkey.core;
var ___utils = ___core;


(function(___core) {
	"use strict";
	var IS_WATCHED_THREADS = /^\/watched\/threads/.test(location.pathname);
	var IS_FORUM_PAGE = /^\/forums\//.test(location.pathname);
	var IS_BOOKMARKS_PAGE = /^\/account\/bookmarks/.test(location.pathname);
	var IS_TAGS_PAGE = /^\/tags\//.test(location.pathname);
	new ___core.Rules(IS_BOOKMARKS_PAGE || IS_TAGS_PAGE ? {
		containerSelector: "ol.block-body, ol.listPlain",
		paginationStrategyOptions: {
			paginationSelector: ".block-outer--after .pageNav",
			pathnameSelector: /\/page-(\d+)\/?$/
		},
		thumbs: { selector: "li.block-row" },
		thumb: {
			selectors: {
				title: ".contentRow-title a",
				uploader: ".contentRow-minor .username"
			},
			getUrlSelector: ".contentRow-title a"
		},
		schemeOptions: [
			"Title Filter",
			"Uploader Filter",
			"Badge",
			"Advanced"
		]
	} : IS_WATCHED_THREADS || IS_FORUM_PAGE ? {
		containerSelectorLast: ".structItemContainer-group, .structItemContainer",
		paginationStrategyOptions: {
			paginationSelector: ".block-outer--after .pageNav",
			pathnameSelector: /\/page-(\d+)\/?$/
		},
		thumbs: { selector: ".structItem.structItem--thread" },
		thumb: { selectors: {
			title: ".structItem-title a",
			uploader: ".structItem-parts .username",
			views: {
				selector: ".structItem-cell--meta dl:nth-of-type(2) dd",
				type: "float"
			},
			replies: {
				selector: ".structItem-cell--meta dl:nth-of-type(1) dd",
				type: "float"
			}
		} },
		gropeStrategy: "all-in-all",
		schemeOptions: [
			"Title Filter",
			"Uploader Filter",
			"Sort By Views",
			"Badge",
			"Advanced"
		]
	} : {
		containerSelector: ".js-replyNewMessageContainer",
		paginationStrategyOptions: {
			paginationSelector: ".block-container + * .pageNav",
			pathnameSelector: /\/page-(\d+)\/?$/
		},
		thumbs: { selector: "article.message" },
		thumb: {
			strategy: "auto-text",
			getUrlSelector: "a[href*=threads]"
		},
		gropeStrategy: "all-in-all",
		schemeOptions: [
			"Title Filter",
			"Badge",
			"Advanced"
		]
	});
})(___core);