You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have a bunch of comics and images that are in a series in their own folder, it is sometimes hard to sort them or view them in a time efficient manor.
Describe the solution you'd like
I would love a button in the carousel or some place that isn't behind so many clicks. I'm not sure of what place would be best though.
Describe alternatives you've considered
I have developed a userscript to do this, but as far as I know it's only possible in the "file info" tab because that is where the link is.
// ==UserScript==// @name Browse at folder// @namespace http://tampermonkey.net/// @version 2024-12-09// @description Add a button to search for files in the same folder// @author sntrenter// @match http://localhost:9999/*// @icon https://www.google.com/s2/favicons?sz=64&domain=undefined.localhost// @grant none// ==/UserScript==//may need to fix encodings https://www.w3schools.com/tags/ref_urlencode.ASP(function(){'use strict';console.log("hello world!");// Add a button to search for files in the same folderdocument.body.addEventListener('click',function(event){// File Info tab is clickedif(event.target.dataset.rbEventKey==="scene-file-info-panel"||event.target.dataset.rbEventKey==="image-file-info-panel"){console.log("hit");lettype=event.target.dataset.rbEventKey.split("-")[0]+"s";console.log(type);// Wait for the panel to rendersetTimeout(()=>{consttabContent=document.querySelector("div.tab-content");if(!tabContent)return;// Find the file path linkconstfileLink=Array.from(tabContent.querySelectorAll("a")).find(link=>link.href.startsWith("file:///"));if(fileLink){// Extract the folder pathconstfilePath=newURL(fileLink.href).pathname;constfolderPath=filePath.substring(0,filePath.lastIndexOf('/')).replace(/%20/g," ");console.log(folderPath);// Double encode the folder path (but fix escaping issues manually)letadjustedPath=folderPath.replace(/\//g,"\\").replace(/\\/g,"\\\\")+"\\\\";adjustedPath=adjustedPath.replace(/%7B/g,"{").replace(/%7D/g,"}").replace(/%5F/g,"_");constsearchParams=`("type":"path","value":"\\"${adjustedPath}\\"","modifier":"INCLUDES")`;console.log(adjustedPath)// Do not double-encode backslashes, encode the whole string correctlyconstsearchURL=`/${type}?c=${encodeURIComponent(searchParams)}&sortby=path`;console.log(searchURL);// Add a hyperlink (styled as a button) to navigate to the search pageif(!document.querySelector("#folder-search-button")){constbutton=document.createElement("a");button.id="folder-search-button";button.textContent="Search Folder";button.href=searchURL;// Set the URLbutton.style.display="inline-block";button.style.padding="10px";button.style.margin="10px";button.style.backgroundColor="#007BFF";button.style.color="white";button.style.textDecoration="none";button.style.borderRadius="5px";button.style.textAlign="center";button.style.cursor="pointer";button.onmouseenter=()=>(button.style.backgroundColor="#0056b3");button.onmouseleave=()=>(button.style.backgroundColor="#007BFF");tabContent.prepend(button);}}},100);// Allow time for the tab content to load}});})();
it should be noted that I haven't done a second pass at this script to clean it up/cover all edge cases.
Additional context
this would be great for people who use tools like gallery-dl or yt-dlp to mass download content in an organized way
I've seen a couple people say it wasn't really possible and I figured it was.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I have a bunch of comics and images that are in a series in their own folder, it is sometimes hard to sort them or view them in a time efficient manor.
Describe the solution you'd like
I would love a button in the carousel or some place that isn't behind so many clicks. I'm not sure of what place would be best though.
Describe alternatives you've considered
I have developed a userscript to do this, but as far as I know it's only possible in the "file info" tab because that is where the link is.
it should be noted that I haven't done a second pass at this script to clean it up/cover all edge cases.
Additional context
this would be great for people who use tools like gallery-dl or yt-dlp to mass download content in an organized way
I've seen a couple people say it wasn't really possible and I figured it was.
The text was updated successfully, but these errors were encountered: