This is an old revision of the document!
Table of Contents
Stash
Sort order/Filter:
The default sort order of items of the tabs is stored with the default filter. Overwriting an existing filter does not overwrite the sort order though. The filter needs to be deleted, then saved and set to default again.
The filters are stored in the database, not the configuration file.
Plugins:
https://github.com/stashapp/CommunityScripts/
User script for local performer face detection:
https://github.com/cc1234475/visage
https://github.com/cc1234475/visage-ml
Custom CSS
Custom CSS needs to be enabled in Settings→Interface→Custom CSS→Enable then Edit
Note: Firefox before v120/121 needs: about:config value of layout.css.has-selector.enabled set to true
/* [Performer tab] Show more item per row */ @media only screen and (min-device-width: 768px){ :not(.recommendation-row .performer-card).performer-card { width: 15%; } :not(.recommendation-row .performer-card-image).performer-card-image { width: 100%; } .performer-card h5 { text-align: center !important; display: block; } .performer-card-image { height: 18rem; } } /* [Studios tab] Show more item per row */ :not(.recommendation-row .studio-card).studio-card { width: 15% } :not(.recommendation-row .studio-card-image).studio-card-image { width: 100% } .studio-card h5 { text-align: center !important; display: block; } /* [Global changes] Hide the Donate button */ .btn-primary.btn.donate.minimal { display: none; } button.minimal.donate.btn.btn-primary { display: none; } /* [Global changes] Modify card when checkbox is selected Note: Firefox before v120/121 needs: about:config value of layout.css.has-selector.enabled set to true */ .grid-card.card:has(input:checked) { box-shadow: 0 0 0 1px var(--primary,rgba(255, 255, 255, 0.30)); } /* Fix face AI plugin being popup being behind the content */ .face-tabs.svelte-p95y28 { // height: 60%; z-index: 1; }
api
Video Compare Userscript
This needs violentmonkey or similar browser plugin.
Base script from: https://gist.github.com/DogmaDragon/fb3ed033c0d1f0a6811137dfea0c4ce8
- video_compare_userscript.user.js
// ==UserScript== // @name Stash Video Compare Userscript // @description Userscript for Stash // @match http://192.168.1.2:9999/* // @match http://192.168.1.2:9998/* // @grant GM_openInTab // @require https://code.jquery.com/jquery-1.12.4.min.js // @require https://gist.github.com/raw/2625891/waitForKeyElements.js // @version 1.1 // @author Scruffynerf / AnonTester // ==/UserScript== (function() { 'use strict'; console.log('Script Stash initialize'); waitForKeyElements(".navbar-brand", addbutton); function addbutton() { const navBar = document.querySelector(".navbar-nav"); const buttonClass = navBar.firstChild.attributes.class.value; const linkClass = navBar.firstChild.firstChild.attributes.class.value; const newButton = document.createElement("div"); newButton.setAttribute("class", buttonClass); newButton.onclick = compare const innerLink = document.createElement("a"); innerLink.setAttribute("class", linkClass); const buttonLabel = document.createElement("span"); buttonLabel.innerText = "Video Compare"; innerLink.appendChild(buttonLabel); newButton.appendChild(innerLink); navBar.appendChild(newButton); } function compare() { if (window.location.pathname == "/sceneDuplicateChecker") { var numberOfChecked = document.querySelectorAll('input.position-static[type="checkbox"]:checked').length; if (numberOfChecked == 2) { var lr = [] const list = document.querySelectorAll('input[type="checkbox"].position-static:checked') for (let item of list) { const row = item.closest('tr'); const nextAnchor = row.querySelector('a'); const url = nextAnchor.getAttribute('href').replace(/\/scenes\//g, '/scene/') lr.push(window.location.origin.concat(url)) } var site = "http://scruffynerf.stashapp.cc" var url = site.concat("?leftVideoUrl=", lr[0], "/stream&rightVideoUrl=", lr[1], "/stream&hideHelp=1") GM_openInTab(url, true); } } else { var numberOfChecked = document.querySelectorAll('input[type="checkbox"]:checked').length; if (numberOfChecked == 2) { const r = /[^"]+\/scene\/\d+\/s/ms; var lr = [] const list = document.querySelectorAll('input[type=checkbox]:checked') for (let item of list) { var urlstuff = item.nextElementSibling.innerHTML var m = r.exec(urlstuff) lr.push(m[0]) } var site = "http://scruffynerf.stashapp.cc" var url = site.concat("?leftVideoUrl=", lr[0], "tream&rightVideoUrl=", lr[1], "tream&hideHelp=1") GM_openInTab(url, true); } } } })();