Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install

ImageFAP direct images++

Bypass the individual pages for images hosted by ImageFAP and disable onClick. Optionally prints a script to dowload with 'wget'

ImageFAP changed the way it handles links in galleries (via onClick javascript) and 'ImageFAP direct images' doesn't work anymore. This script is a replacement for it.

USAGE:
set wgetScriptInclude to true to include the wget script in the end of the gallery
or simply use the menu command to generate it.

CHANGELOG:
  • version 080615
    +wget script include added
    +wget script menu command added
    -CleanDisplay removed (obsolete)
  • version 080405
    @include modified, code not changed
  • version 080112
    CleanDisplay (ajax mode) added
  • version 0.6(20/11/07)
    code cleaned, optimized and decode function removed
  • version 0.5.1 (30/10/07)
    @include modified, code not changed
  • version 0.5 (13/09/07):
    modified to work with new " :: prev :: | 1 | 2 | 3 | :: next :: " links
  • version 0.4 (22/09/06):
    modified to work with imagefap changes
  • version 0.3 (30/04/06):
    works when onClick is not active.
  • version 0.2 (29/04/06):
    fixed : the value of the variable 'xk' changes everytime and its name too!
    include for the userscript changed ( thanks buergi ;) )
  • version 0.1 (21/04/06): first release





Jun 27, 2008
Slakoblanco User

To save images in downthemall without getimg.php click on "remaining mask" and type *name*.jpg or whatever file extension your using. also remember to click on "rename" for the option (if a file name already exists) in main preferences

 
Jun 21, 2008
Good To Too User

request

Tie into the extension DownThemAll -- it can pass a referer back to the webhost
https://addons.mozilla.org/en-US/firefox/addon/201

 
Jun 20, 2008
cyberonin User

@r0ssar00

How could .js executable?
It always prompt "Open with" options.

Thank you very much

 
Jun 15, 2008
darodi Script's author

as requested, I also added a wget script generator.
You can always inlude the script in the end of the gallery if you set 'wgetScriptInclude' to true,
or just use the gease monkey menu command to generate it.

 
Jun 11, 2008
r0ssar00 User

tip for everyone: you can download the entire galery by installing cruiser, then the latest version of imagefap direct images++ (i think it will only work in that order but i haven't tried anything else)
finally, get the version of wget for your operating system and install it into your path
eg. on windows, put it into your windows\system32 folder

when they are installed, go tools->greasemonkey->manage user scripts...
then click cruiser, then change the allowed sites to h t t p : / / w w w . i m a g e f a p . c o m / g a l l e r y . p h p ? g i d = *
(remove the spaces)
i did that because cruiser stepped in on other web sites where it wasn't 18+ type images(pr0n) that had a lot of images but accompanying(spelling?) text.
it's easier to whitelist the sites you want it to work on then blacklist everything else

when cruiser loads the gallery, scroll all the way to the bottom and click "Click here to generate a script" blah blah blah.
copy and paste everything under that line into a new text file with the extension bat(this creates a batch script file)
create a folder somewhere on your computer and save that text file in there
double-click on the bat file and the gallery will download

my system: i created a jscript script to insert a sleep every 10 pics so that a million wget's won't be open and your net connection will still work with decent speed
you must get a windows version of sleep.exe

// sleeptime controls the amount of seconds between 10 pic downloads
var sleeptime = 3;
var fs,fs2,infile,outfile,ForReading;
var Args = WScript.Arguments;
ForReading = 1;
fs = new ActiveXObject("Scripting.FileSystemObject");
fs2 = new ActiveXObject("Scripting.FileSystemObject");
infile = fs.OpenTextFile(Args(0),1,false);
outfile = fs2.OpenTextFile(Args(1),2,true);
var counter = 0;
var line = "";
outfile.WriteLine("@echo off")
while (infile.AtEndOfStream==false)
{
	counter = counter + 1;
	if (Args(2)=="startsleep") {
		line = "start /min " + infile.ReadLine();
	}
	if (Args(2)=="startnosleep") {
		line = "start /min " + infile.ReadLine();
	} 
	if (Args(2)!="startsleep" && Args(2)!="startnosleep") {
		line = infile.ReadLine();
	}
	if (counter==10)
	{
	outfile.WriteLine("@echo on");
	outfile.WriteLine(line);
	outfile.WriteLine("@echo off");
		if (Args(2)=="startsleep") {
			outfile.WriteLine("sleep " + sleeptime);
		}
		if (Args(2)=="nostartsleep") {
			outfile.WriteLine("sleep " + sleeptime);
		}
		counter = 0;
	} else {
	outfile.WriteLine(line);
	}
}

theres probably extra stuff in there but i don't care, it works.
usage: addsleep.js origdownload.bat newdownload.bat mode
where mode is one of:
startsleep - adds a start /min in front of each wget call and adds a sleep for sleeptime every 10 pics
startnosleep - adds a start /min in front of each wget call and does not add a sleep
nostartsleep - doesn't add a start /min but sleeps for sleeptime every 10 pics
anything else - doesn't sleep or add a start
mode has to be something, if you don't want a sleep or a start, use asdf or something
change the sleeptime for what you want the delay between 10 pics to be
i named it addsleep.js and put it in my windows\system32 folder

i also set up another batch script called ddownload.bat in my windows\system32 folder

@echo off
notepad download.bat
addsleep download.bat real.bat nostartsleep
del download.bat
move real.bat download.bat
download.bat

which opens notepad with a new file called download.bat, adds the sleeps, but no starts, and starts the download

my process: 1) find a gallery
2) copy the generated script
3) open a cmd in my directory
4) exec ddownload and paste the script
5) sit back and wait for it to finish
6) whatever floats your boat
there you have it, free imagefap gallery downloads

 
May 26, 2008
jkdamacy User

Is there any way to save these images without them being renamed to getimg.php? Particularly when using a mass downloader like DownThemAll?

 
May 8, 2008
SpeedyJ User

Thanks but I can't get this to work properly. I keep ending up with missing images and incomplete truncated pics (like half a pic and then garbage in the bottom bit).

I've been using the free version of Bulk Image Downloader to download from imagefap and it doesn't seem to have any of these problems. Any ideas?

 
Apr 11, 2008
bipsync User

script working great.. thanks..

 
Apr 5, 2008
darodi Script's author

bipsync:
Thanks for the info.
I added
@include http://*imagefap.com/gallery/*
It should work now.

 
Apr 4, 2008
bipsync User

hi.. your script is nice.. but now.. it only works when i click the one page or simple view function on imagefap page.. have to switch between the view.. any help.. sorry for my english..

 
Jan 12, 2008
darodi Script's author

VoodooGlowSkull:
I updated the script to change the first page too.
juste change ajax_mode to true.

 
Jan 8, 2008
VoodooGlowSkull User

Thanks for the nice script. I have replaced the "gallery.php" with "ajax_gallery_display" and like the results. Clicking on a gallery link in a browse gallieries page or user gallery page obviously still takes me to the first 'gallery.php' page instead of the ajax page. How do I modify the script so that I never see the first 'gallery.php' page but rather go straight to the ajax one from a gallery list page?

 
Dec 26, 2007
darodi Script's author

oops .. I forgot...
you should also add
http://*imagefap.com/ajax_gallery_display.php?*
in the included pages
if you replace "gallery.php?" with "ajax_gallery_display.php?" in the script

 
Dec 26, 2007
darodi Script's author

grokis:
try replacing "gallery.php?" with "ajax_gallery_display.php?" in my script, you won't see anything on the page except images. No scripts, no banners...
See if that's ok for you.

for you second question, if you are too tired to press back why don't you just open the gallery in a new tab and keep the gallery list in the first one? :)

 
Dec 26, 2007
grokis User

Ah and also another problem that comes from the complete site reloading; when I clicked through to page 5 e.g. I have to use the 'back' function 6 times to be on the gallery overview page again, that sucks a bit, because on the original site you only have to click once...
Any way to change this?

Thanks!

 
Dec 25, 2007
grokis User

Hello,
when I use you script and klick on the "next" or "previous" link the whole page is reloaded and I'm again at the top, so that I have to scroll - is there a way to use this normal frame (or however imagefap does this)?

Also I tried to write a script but didn't had that much success - I wanted to modify your script so that all Javascript is removed from the site and all those stuff at the top is removed; is that possible?

Thank you

 
Dec 5, 2007
aditya agita User

im newbie here..
You are very very smart man
Thanx a lot

 
Nov 20, 2007
darodi Script's author

A little explanation about the CTRL+S (Save As)/(getimg.php) "bug":

if you follow a link like this
http://images.imagefap.com/images/full/31/410/4...

you get a http response from the server:

HTTP/1.x 302 Found
Location: http://85.17.40.49/full/getimg.php?img=41003809...

The 302 code means redirect.
Then your firefox asks automatically for it
GET /full/getimg.php?img=410038097.jpg HTTP/1.1

the real location becomes http://85.17.40.49/full/getimg.php?img=41003809...
and the filename is getimg.php
and it's Content-Type: image/jpeg

greasemonkey is unable to process scripts for other things than web pages (in this case, a jpeg)
That's why changing the document title wasn't working. Even a simple GM_log("blah") doesn't work.

Anyway... I might have found a way to bypass this. Now I just need to find some time to do it and test it.

 
Nov 11, 2007
Vivek Krishnan User

Hi Darodi,

The script is working great. It rips the images correctly even with the recent ImageFAP gallery changes.

I have a small concern though. I am using Firefox and when I right-click on the direct image and save it, it saves with the correct image filename. When I try to do a CTRL+S (Save As), it shows the page title (getimg.php) instead of the actual image filename.

I tried tweaking your script to set the document.title properly, but it isn't working.

Can you please update your script so that the direct image page has its title the same as the image filename ?

Thanks for your excellent efforts on this script.

Cheers,
Vivek.

 
Oct 30, 2007
superfal User

Thanks Darodi,
Everything is fine now.
Excellent work!

 
Oct 2, 2007
imagefapper User

thank you for creating this script. it is very helpful. i am having a problem, though. when i use DownThemAll! to download the images it ends up as "getimg.php". if i resume the download quickly then it will download the actual image. is there a way to fix this or perhaps a better mass download script/program.

 
Sep 30, 2007
mrnukem User

Excellent Script. Thank you

 
Sep 13, 2007
darodi Script's author

Hi guys! ...back after a long absence.

superfall: I tried your link. I think I had that problem a few months ago, but it works right now. I have the picture, not the code.

If somebody still has problems with the new version, leave a msg, I'll reply faster this time.

Anyway... I updated the script. Imagefap has new 'onclick' methods for pages in a gallery. The new script removes those and puts direct links instead.

Enjoy!

 
Jul 23, 2007
superfal User

To Picgrabber:
no work around yet (to my knowledge).

Other Imgafap script: http://userscripts.org/scripts/show/10121
has been upgraded fo r this issue.

But like this script much better.

 
Jul 22, 2007
picgrabber User

To Superfal:
Same problem I have also since a couple of weeks!
there is already a solution?
any idea??

You could comment on this script if you were logged in.