Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Gallery Script

Name: Anonymous 2009-05-10 6:24

Why doesn't my script work?


// @description      Creates a large Thumbnail collection from a given Google Image Search
// @include       http://images.google.*/*;
// ==/UserScript==


//var Knoten = window.document.images[0];
//window.document.images[0].parentNode.removeChild(Knoten);

function CreateImageObject(ThumbUrl, ImageUrl){
                nimghnd = document.createElement('img');
                nimghnd.width=96;
                nimghnd.height=96;
                nimghnd.border=0;
                nimghnd.src=ThumbUrl;
               

                nlnkhnd=document.createElement('a');
                nlnkhnd.href= ImageUrl.match( /\/imgres\?imgurl\=(.*?)\&imgrefurl\=/ )[1];
                nlnkhnd.appendChild(nimghnd);


                ntblhnd=document.createElement('table');
               
                ntblhnd.setAttribute('style', 'display:inline;');
                ntblhnd.width=140;
                ntblhnd.height=140;
                ntblhnd.border=0;
                ntblhnd.cellPadding=0;
                ntblhnd.cellSpacing=0;
               

                ntr1hnd=document.createElement('tr');ntr1hnd.height=22;ntr1hnd.width=140;
                ntr2hnd=document.createElement('tr');ntr2hnd.height=96;ntr2hnd.width=140;
                ntr3hnd=document.createElement('tr');ntr3hnd.height=22;ntr3hnd.width=140;

                ntd11hnd=document.createElement('td');ntd11hnd.width=22;ntd11hnd.height=22;
                ntd12hnd=document.createElement('td');ntd12hnd.width=96;ntd12hnd.height=22;
                ntd13hnd=document.createElement('td');ntd13hnd.width=22;ntd13hnd.height=22;

                ntd21hnd=document.createElement('td');ntd21hnd.width=22;ntd21hnd.height=96;
                ntd22hnd=document.createElement('td');ntd22hnd.width=96;ntd22hnd.height=96;
                ntd23hnd=document.createElement('td');ntd23hnd.width=22;ntd23hnd.height=96;

                ntd31hnd=document.createElement('td');ntd31hnd.width=22;ntd31hnd.height=22;
                ntd32hnd=document.createElement('td');ntd32hnd.width=96;ntd32hnd.height=22;
                ntd33hnd=document.createElement('td');ntd33hnd.width=22;ntd33hnd.height=22;

                ntd11hnd.setAttribute('background', 'http://hansschmucker.free.fr/frame/01.png');
                ntd12hnd.setAttribute('background', 'http://hansschmucker.free.fr/frame/02.png');
                ntd13hnd.setAttribute('background', 'http://hansschmucker.free.fr/frame/03.png');
                ntd21hnd.setAttribute('background', 'http://hansschmucker.free.fr/frame/04.png');
                ntd23hnd.setAttribute('background', 'http://hansschmucker.free.fr/frame/06.png');
                ntd31hnd.setAttribute('background', 'http://hansschmucker.free.fr/frame/07.png');
                ntd32hnd.setAttribute('background', 'http://hansschmucker.free.fr/frame/08.png');
                ntd33hnd.setAttribute('background', 'http://hansschmucker.free.fr/frame/09.png');

                ntr1hnd.appendChild(ntd11hnd);
                ntr1hnd.appendChild(ntd12hnd);
                ntr1hnd.appendChild(ntd13hnd);

                ntr2hnd.appendChild(ntd21hnd);
                ntr2hnd.appendChild(ntd22hnd);
                ntr2hnd.appendChild(ntd23hnd);

                ntr3hnd.appendChild(ntd31hnd);
                ntr3hnd.appendChild(ntd32hnd);
                ntr3hnd.appendChild(ntd33hnd);

                ntblhnd.appendChild(ntr1hnd);
                ntblhnd.appendChild(ntr2hnd);
                ntblhnd.appendChild(ntr3hnd);

                ntd22hnd.appendChild(nlnkhnd);
               
                return ntblhnd;
               
}


function Simplify(Source,Target){
    var tblnum=8;
    var tblhnd=Source.getElementsByTagName("table")[tblnum];

    var imgnum=1;

    for (var n = 0; n < 5; n++){
        var tblhnd=Source.getElementsByTagName("table")[tblnum];
        var lnkhnd=Source.getElementsByTagName("a")[tblnum];
        for (var i = 0; i < 4; i++){
            var imghnd=         tblhnd.getElementsByTagName(  "img")[     i];
            var lnkhnd=         tblhnd.getElementsByTagName(    "a")[     i];

            if (imghnd) {

                ntblhnd=CreateImageObject(imghnd.src,lnkhnd.href);
                Target.appendChild(ntblhnd);
           
            }
        }

        if(tblhnd){
            Source.getElementsByTagName("table")[tblnum].parentNode.removeChild(tblhnd);
        }
   
    }
}



prev=top.document.getElementsByTagName("body")[0];



if(top.location.href==self.location.href){
    var lnbrk=document.createElement('p');
    prev.appendChild(lnbrk);

    var page1=document.createElement('iframe');
    page1.src=self.location.href+"&theresadifference=intheurl";
    page1.width=1;
    page1.height=1;
    page1.border=0;
    page1.id="page1";
    lnbrk.appendChild(page1);
    for(i=1;i<12;i++){
        srchref= top.document.getElementsByTagName("div")[0].getElementsByTagName("a")[i].href;
        if((!srchref.match( /.*prev.*/ )) && (!srchref.match( /.*next.*/ )) && srchref.match( /.*images\.google.*/ )){
            var page1=document.createElement('iframe');
            page1.src=srchref;
            page1.width=1;
            page1.height=1;
            page1.border=0;
            page1.id="page1";
            lnbrk.appendChild(page1);
        }
    }

}else{
    prev=top.document.getElementsByTagName("body")[0];
    Simplify(document,prev);
    self.close;
}

Name: Anonymous 2009-05-10 6:35

I vomited

Name: Anonymous 2009-05-10 7:24

>>2
I did that thing where you vomit a little bit in your mouth, but then you swallow it back down.

Name: Anonymous 2009-05-10 7:52

>>2
>>3
I'm hard

Name: Anonymous 2009-05-10 7:53

The pleasure of being vomited inside.

Name: Anonymous 2009-05-10 7:54

>>4
You may want to see a therapist about that

Name: Anonymous 2009-05-10 7:56

you have to program in english for it to work.

Name: Anonymous 2009-05-10 8:11

>>7
I second this, you should be programming in applescript

Name: Anonymous 2009-05-10 9:02

>>6
What does the rapist have to do with being vomited inside?

Name: Anonymous 2009-05-10 10:03

//var Knoten =
Stopped reading there.

Name: Anonymous 2009-05-10 10:31

>>10
why?

Name: Anonymous 2009-05-10 16:14

>>9
The pleasure of being vomited inside.

Name: Anonymous 2009-05-10 17:21

(Post truncated.)
Stopped reading there.

Name: Anonymous 2009-05-27 10:29

How do I transalte the script into english ?

DON'T HELP HIM!!!!

Name: Anonymous 2009-05-27 13:32

A=as;B=meaningless;C=evidenced;D=coding;E=by;F=because;K=variables;N=your;R=technique;T=your;U=utter;W=is;Z=shit;
answer FTDRWUZ,ACENBK;

Name: Anonymous 2009-05-27 15:43

>>1

probably because its flawed, im not sure

Name: Anonymous 2009-05-27 17:58

i think you need more appendChild

Name: Anonymous 2009-05-27 18:37

>>17
fuck you pedo

Name: Anonymous 2009-05-27 18:41

>>17

                    22244222                                                  
                 25555555555  4                                               
                5 555  555 5555 2                      2244222                
               5 55 52222224 555 222444444444222    45 5555555 52             
              2 555 22222445 5555555555555555555555  555  555555 2            
              2 555 2245 55555555555555544444444444455  4222222555            
                 55 5 5555555555555554444444444444444445 522222555            
                5 5555555555555555544444444444444444444445 52455              
                   55555555555555544444444444444444444444445 555              
                 55555555555555554444444444444444444444444445 2               
                 5555555555555    544444444444444444444444444 4               
              5 555555555555        44444444444444445555554445 2              
             2 5555555555555        4444444444444445       44454              
             5 555555555555555    54444444444444444        44455              
              55555555555555555544444444444444444445      54445               
            4 5555555555555555555552222222444222444444555444444               
           2 555555555555555555 422222225     52222555444444444 2             
          2 555555555555555555 4222222225     5222222 544444444 2             
         5 5555555555555555555 5222222222455422222222 54444444455             
       2555555555555555555555555 5555555444455442224 54444444444 2            
      4 545 5555555555555555555555 54 2       25 5554444444444445 2           
         2 55555555555555555555555 54 2      245 4444444455444 555 52         
           5  55  555 5555555555555545 2    255 544445545  545                
         22     5    5  55555555555 5445555555 5444445   55 5  4              
         5 55555555555555555555554445 5555555 54444445 55555544554            
       2 555555555555555555555444444445555555444444444555555444445 4          
      2 5555555555555555555544444444444444444444444444 55555544444455         
       5555555555 555555555444444444444444444444444445 55555555554445         
     5 5555555555 5555555544444444444444444444444444455  25 55 55444455       
    2 5555555555  5555555544444444444444444444444444455    455444444455       
    4 55555555555             54444444444444444444444 2  4 54444444455        
    5 5555555555555555555555555 544444444444444444445   55444444455 2         
    4 5555555555555555555555555 54444444444444444444 4   55555555 4           
    2 555555555555555555555555 5444444444444444444455   2 5555542             
     4 555555555555555555555  544444444444444444445

Name: Anonymous 2009-05-27 18:50

>>19
(Post truncated.)
Stopped reading right there.

Name: Anonymous 2009-05-27 20:38

>>20
Name: Anonymous

Stopped reading right there.

Name: Anonymous 2009-05-27 23:15

Stopped reading right there.
I invented this meme. You owe me 0.5 Susscoin for every time you used it on /prog/. Contact me if you want bulk arrangements.

Name: Anonymous 2009-05-27 23:27

>>22
You have been caught trolling.

Name: Anonymous 2009-05-27 23:43

>>23
BUT THE PUNISHMENT FOR TROLLING IS CUTTING OFF HIS HANDS!!

Name: Anonymous 2009-05-27 23:45

ECHO(1)                 FreeBSD General Commands Manual                ECHO(1)

NAME
     echo -- write arguments to the standard output




ECHO(1)                 FreeBSD General Commands Manual                ECHO(1)

NAME
     echo -- write arguments to the standard output

Name: Anonymous 2009-05-28 0:34

>>25
You pasted it twice pasted it twice it twice twice ice

Name: Anonymous 2009-05-28 0:43

>>26
Check again.

Name: Anonymous 2009-05-28 0:47

>>25

$ echo Hello
Hello
Oh look, this isn't an argument.
Yes it is.
No it isn't. It's just repetition.
No it isn't.
It is!
It is not.
I came here for a good argument.
No you didn't; no, you came here for an argument.
An argument isn't just repetition and contradiction.
It can be.
No it can't. An argument is a connected series of statements intended to establish a proposition.
No it isn't.
Argument is an intellectual process. Repetition is just the automatic imitation of any statement the other person makes.
No it isn't.
It is.
Not at all.
Oh I've had enough of this.

Name: Anonymous 2009-05-28 0:50

>>26
The first one is for FreeBSD 7.0
The second one is for FreeBSD 7.1

Name: Anonymous 2009-05-28 1:11

>>28
That'll be a [i]dollar fifty[/i].

Name: Anonymous 2009-05-28 1:12

>>29
No. First one is done using [m] tags.
The secong is done using [code] tags.

That is all.

Name: Anonymous 2009-05-28 1:49

>>28
Are you trying to speak to your terminal? Seek help :(

Name: Anonymous 2009-05-28 4:32

$("img").each(function() {
    $("table#imageTable").append($("<td></td>").append(this));
});

Name: Anonymous 2009-05-28 8:01

>>32
I agree with this guy. I am starting to feel kinda bad about >>28 :(

Name: Anonymous 2009-05-28 12:17

>>32
I don't think that would be much use. It's already a terminal condition.

Name: Anonymous 2009-05-28 14:47

>>35
Damn you I lol'd.

Name: Anonymous 2009-05-28 14:55

It's useless... not even Jay Sussman could fix this

Name: Anonymous 2009-06-14 9:24

HALP Frozen Void!

Name: Anonymous 2009-06-14 10:09

>>38
// ==UserScript==
// @name           fix prog
// @description    fixes all of FrozenVoid's posts on /prog/
// @namespace      http://dis.4chan.org/prog/
// @include        http://dis.4chan.org/*;
// @version        1.2
// ==/UserScript==

(function(){
 var posts = [];
 var myclass = new RegExp('\\bpost\\b');
 var divs = document.getElementsByTagName('div')
 for(var i = 0; i < divs.length; ++i){
  var classes = divs[i].className;
  if(myclass.test(classes)) posts.push(divs[i]);
 }
 for(var i = 0; i < posts.length; ++i){
  var postername = posts[i].getElementsByTagName('span')[3];
  var postertrip = posts[i].getElementsByTagName('span')[4];
  //if(/^!FrOzEn2BUo/.test(postertrip.innerHTML))
  if(/FrozenVoid/.test(postername.innerHTML))
   posts[i].parentNode.removeChild(posts[i]);
 }
})();

Name: FrozenVoid 2009-06-14 10:34

Name: Anonymous 2009-06-14 11:06

>>40
Thanks man. I installed it but don't see any extra functionality to create a gallery. Maybe I'm missing something. Plus change namespace to


http://images.google.*;


So it works internationally.

Name: FrozenVoid 2009-06-14 13:27

>>41 what do you mean by gallery? Are you loading full images or not?
My script just makes it that if you click on images you directly open the full image,instead of loading the webpage with google frame on top.

____________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
orbis terrarum delenda est

Name: Anonymous 2009-06-14 14:22

>>42
I meant can you debug the script in OPs post. It's supposed to allow you to create a massive gallery out of the results.

Google's image search results are much like the rest of the site, sparsely populated and easily rendered on virtually any computer. This script returns a compact selection of 200 images on a single page.1

_________________________________________________
[1] http://worshiptheglitch.com/2005/10/tweaking-firefox-and-opera-scripts-for.html

Name: Anonymous 2009-06-14 15:48

Name: FrozenVoid 2009-06-14 16:07

>>43
I don't understand what his script adds to the page. Its some useless 'eyecady'?
1.OP script works on single page. It doesn't load 200 images from google(ajax req.).
2.OP script build a stupid table when google already has the result page formatted as a table.
3.OP script needs frames for some reason.
If using more than one window is too hard for you, just use change index image:
onclick=document.getElementById('indimg').src=this.href;return false;

________________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
orbis terrarum delenda est

Name: Anonymous 2009-06-14 18:14

>>45
I don't see how any of those are good, let alone reasons to dislike REAL JavaScript code, man.

Name: Anonymous 2009-06-14 18:26

>>46
I don't see how, in this day and age, people can still see FrozenVoid's posts.

Name: Anonymous 2009-06-14 21:57

>>47
I didn't even realize that FrozenVoid was back. ...I'm upset now.

Name: Anonymous 2009-06-15 2:41

>>48
At least he isn't trolling or crashing servers.

Name: Anonymous 2009-06-15 16:36

>>45
Where do I put that code in OPs script?

Name: Anonymous 2009-06-16 5:32

bumped

Name: Anonymous 2009-07-30 4:41

>>49
Shut up sean.

Name: Anonymous 2010-12-09 8:16

Name: Anonymous 2011-01-31 20:01

<-- check em dubz

Don't change these.
Name: Email:
Entire Thread Thread List