Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[INDEX] Open Dir Image Viewer - Tampermonkey
#1
Add this script to Tampermonkey and it transforms all the links in an open directory webpage into images  Big Grin

Saves you from having to use a fusker or a third party stripper like StriDir

Works pretty good so far

Not my script, found on userscripts-mirror.org[url=https://userscripts-mirror.org/][/url]

Happy Hunting

__________________________________________________________________________________________________________________

// ==UserScript==
// @name           Open Dir Image Viewer
// @namespace      lenzm.net
// @include        *
// ==/UserScript==

function xpath(query) {
return document.evaluate(query, document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
}

function addImages() {
var max = 100;
var links = xpath("//a[@href]");
for (var i = 0; i < links.snapshotLength && i < max; i++) {
var a = links.snapshotItem(i);
if (a.href.match(/\.(jpg|jpeg|gif|png)$/i)) {
a.innerHTML = "<img src=\"" + a.href + "\">";
}
}
}

var title = document.getElementsByTagName('title')[0].innerHTML;
if(title.match(/^Index of /)) {
addImages();
}
Reply
#2
Rep added
Reply
#3
It seems like this is suppose to turn on when it recognizes the "Index of" title of the web page.

Notice the code itself is a bit outdated but can't seem to get this to work. Tamper monkey is greyed out and wont engage the script.

EDIT: This does work when searching archives etc. Just not FTP directories. At least from my short experience.
Reply
#4
Correct, it won't allow you to preview FTP directory items. Those need to be downloaded and can be easily stripped with Filezilla or similar.

I see the confusion though from the thread, I posted as INDEX and the thread groups it with FTP, just differentiated by the color pink.
Reply
#5
for chrome there is an extension/add on called gallerify that does something similar
Reply
#6
(08-29-2019, 12:41 PM)gio1111 Wrote: for chrome there is an extension/add on called gallerify that does something similar

Yeah, this script allows you to view them before they are downloaded. Looks like gallerify extension downloads them, if I am understanding correctly.


There are similar applications like JDOWNLOADER that allow you to pick and choose files you want to download from an online link, instead of downloading the whole batch.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  FTP Hodges Open UNSECURED Indexes Hodge 59 28,099 03-11-2019, 03:31 PM
Last Post: Jakoffuks
  Kelly P / open directory amazeballs00 2 2,058 06-06-2018, 03:44 AM
Last Post: Hodge
Photo NAS Open webcam nuttydave 7 2,798 02-07-2018, 06:29 PM
Last Post: Hodge
Photo FTP open ftp willyz80 0 1,736 11-17-2016, 09:30 PM
Last Post: willyz80
Photo NAS Open Drive lithis 2 2,649 09-28-2015, 08:33 AM
Last Post: Hodge



Users browsing this thread: 1 Guest(s)