config:stash
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| config:stash [2024/07/28 13:08] – Wuff | config:stash [2025/08/30 00:01] (current) – [api] Wuff | ||
|---|---|---|---|
| Line 20: | Line 20: | ||
| - | ===== Custom CSS ===== | + | ===== Custom CSS/JS ===== |
| - | Custom CSS needs to be enabled in Settings-> | + | Custom CSS/ |
| Note: Firefox before v120/121 needs: about: | Note: Firefox before v120/121 needs: about: | ||
| Line 80: | Line 80: | ||
| </ | </ | ||
| + | |||
| + | ==== Scene Search at top ==== | ||
| + | |||
| + | This moves the scene search from the sidebar to the top bar | ||
| + | |||
| + | <code javascript> | ||
| + | // Move search from sidebar next to filter at top | ||
| + | (function() { | ||
| + | const sourceSelector = 'body div div.main.container-fluid div.item-list-container.scene-list div.sidebar-pane div.sidebar div.sidebar-search-container'; | ||
| + | const targetSelector = 'body div div.main.container-fluid div.item-list-container.scene-list.hide-sidebar div.sidebar-pane.hide-sidebar div div.scene-list-toolbar.btn-toolbar'; | ||
| + | |||
| + | const observer = new MutationObserver(() => { | ||
| + | const sourceElement = document.querySelector(sourceSelector); | ||
| + | const targetContainer = document.querySelector(targetSelector); | ||
| + | |||
| + | if (sourceElement && targetContainer) { | ||
| + | targetContainer.insertBefore(sourceElement, | ||
| + | observer.disconnect(); | ||
| + | console.log(' | ||
| + | } | ||
| + | }); | ||
| + | |||
| + | // Observe the entire document for added/ | ||
| + | observer.observe(document.body, | ||
| + | childList: true, | ||
| + | subtree: true | ||
| + | }); | ||
| + | })(); | ||
| + | </ | ||
| + | |||
| + | ==== Studio as Text ==== | ||
| + | |||
| + | This replaces unset studio logos with a clickable text link. | ||
| + | |||
| + | CSS | ||
| + | <code css> | ||
| + | /* Studio as text */ | ||
| + | a[data-processed] { | ||
| + | font-size: 1.5rem; | ||
| + | color: inherit; | ||
| + | text-decoration: | ||
| + | display: inline-block; | ||
| + | } | ||
| + | |||
| + | a[data-processed]: | ||
| + | text-decoration: | ||
| + | } | ||
| + | |||
| + | </ | ||
| + | |||
| + | Javascript | ||
| + | <code javascript> | ||
| + | /* Studio as text */ | ||
| + | function processStudioLogos() { | ||
| + | document.querySelectorAll(' | ||
| + | const link = img.closest(' | ||
| + | if (link && img.alt && !link.hasAttribute(' | ||
| + | const cleanName = img.alt.replace(/ | ||
| + | link.textContent = cleanName; | ||
| + | link.setAttribute(' | ||
| + | } | ||
| + | }); | ||
| + | } | ||
| + | |||
| + | const observer = new MutationObserver(function(mutations) { | ||
| + | mutations.forEach(function(mutation) { | ||
| + | if (mutation.addedNodes.length) { | ||
| + | processStudioLogos(); | ||
| + | } | ||
| + | }); | ||
| + | }); | ||
| + | |||
| + | observer.observe(document.body, | ||
| + | childList: true, | ||
| + | subtree: true | ||
| + | }); | ||
| + | </ | ||
| + | |||
| Line 87: | Line 165: | ||
| https:// | https:// | ||
| + | |||
| + | |||
| + | < | ||
| + | #If API authentication is required, add the following to the curl commands: | ||
| + | -H " | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | # Metadata Scan of a particular directory | ||
| + | curl -X POST http:// | ||
| + | -H " | ||
| + | -d '{ | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | }' | ||
| + | |||
| + | curl -X POST http:// | ||
| + | -H " | ||
| + | -d '{ | ||
| + | " | ||
| + | }' | ||
| + | </ | ||
| + | |||
| + | |||
| + | < | ||
| + | # Full Metadata Scan | ||
| + | curl -X POST http:// | ||
| + | -H " | ||
| + | -d ' | ||
| + | |||
| + | curl -X POST http:// | ||
| + | -H " | ||
| + | -d ' | ||
| + | |||
| + | </ | ||
| + | |||
| + | Show status: | ||
| + | < | ||
| + | curl -X POST http:// | ||
| + | -H " | ||
| + | -d ' | ||
| + | </ | ||
| + | |||
| + | Show status until done: | ||
| + | < | ||
| + | while true; do | ||
| + | curl -s -X POST http:// | ||
| + | -H " | ||
| + | -d ' | ||
| + | | jq ' | ||
| + | sleep 5; | ||
| + | done | ||
| + | </ | ||
| + | |||
| Line 362: | Line 496: | ||
| # | # | ||
| </ | </ | ||
| + | |||
| + | |||
config/stash.1722168534.txt.gz · Last modified: by Wuff