Infinite scroll [optional]. Filter by Title and Duration
// ==UserScript== // @name SpankBang.com PervertMonkey // @namespace pervertmonkey // @version 4.0.0 // @author violent-orangutan // @description Infinite scroll [optional]. Filter by Title and Duration // @license MIT // @icon https://www.google.com/s2/favicons?sz=64&domain=spankbang.com // @homepage https://github.com/smartacephale/sleazy-fork // @homepageURL https://github.com/smartacephale/sleazy-fork // @source github:smartacephale/sleazy-fork // @supportURL https://github.com/smartacephale/sleazy-fork/issues // @match https://*.spankbang.*/* // @match https://*.spankbang.com/* // @require https://cdn.jsdelivr.net/npm/[email protected]/dist/core/pervertmonkey.core.umd.js // @require data:application/javascript,var core = window.pervertmonkey.core || pervertmonkey.core; var utils = core; // @grant GM_addStyle // @grant unsafeWindow // @run-at document-idle // ==/UserScript== (function (core, utils) { 'use strict'; new core.RulesGlobal({ containerSelector: ".main-container .js-media-list, .main_content_container .video-list", paginationStrategyOptions: { paginationSelector: ".paginate-bar, .pagination" }, thumbsSelector: ".video-item:not(.clear-fix), .js-video-item", getThumbImgDataStrategy: "auto", titleSelector: "[title]", durationSelector: '[data-testid="video-item-length"]', gropeStrategy: "all-in-all", schemeOptions: ["Text Filter", "Duration Filter", "Badge", "Advanced"], animatePreview }); function animatePreview(container) { function createPreviewElement(src) { return utils.parseHtml(` <div class="video-js vjs-controls-disabled vjs-workinghover vjs-v7 vjs-playing vjs-has-started mp4t_video-dimensions vjs-user-inactive" id="mp4t_video" tabindex="-1" lang="en" translate="no" role="region" aria-label="Video Player" style="opacity: 1;"> <video id="mp4t_video_html5_api" class="vjs-tech" tabindex="-1" autoplay="autoplay" muted="muted" playsinline="playsinline" src="${src}"> </video> </div>`); } function animateThumb(e) { const src = e.querySelector("[data-preview]")?.getAttribute("data-preview"); const vid = createPreviewElement(src); e.append(vid); return () => { const v = vid.querySelector("video"); utils.exterminateVideo(v); vid.remove(); }; } utils.onPointerOverAndLeave( container, (e) => e.tagName === "IMG", (e) => { const target = e; const leaveTarget = target.closest(".thumb"); const onOverCallback = animateThumb(leaveTarget); return { leaveTarget, onOverCallback }; } ); } })(core, utils);