The Inside Job



  • A friend of mine is part of the web-design team for video games-themed website http://sdforum.b1.jcink.com/, and recently caught a fellow webmaster sneaking this into the site's code:

     <SCRIPT>

        var yBase = screen.width / 2;
        var xBase = screen.height / 2;
        var delay = 10;
        var step = .2;
        var currStep = 0;
        var Xpos = screen.width / 4;
        var Ypos = screen.height / 2;
        var j=0;
     
        window.resizeTo(1,1);

        
        movew0w();
        
        
        function movew0w() {
            for ( j = 0 ; j < 5 ; j++ ) {
            self.moveTo(Ypos + Math.cos((20Math.sin(currStep/(20+j)))+j70)yBase(Math.sin(10+currStep/10)+0.2)Math.cos((currStep + j25)/10),  Xpos + Math.sin((20Math.sin(currStep/20))+j70)xBase(Math.sin(10+currStep/(10+j))+0.2)Math.cos((currStep + j25)/10)) }
            currStep += step;
            setTimeout("movew0w()", delay);
        
        
         }

    </SCRIPT>

     To the considerable surprise of the person responsible, and absolutely nobody else, his fellow admin staff failed to see the humour in this.



  • It makes the window tiny and spins it around in a circle, aye?
    Reminds me of this.



  • LOL! That's pretty funny, that would make a cool XSS attack.



  • @Sunday Ironfoot said:

    LOL! That's pretty funny, that would make a cool XSS attack.

     

    Of course, those of us with sane browsers that allow us to disable moving/resizing windows from script are immune.

    <rant>

    What I'd really like to see is a way to make the "screen" object only return the size of my window, websites have no business knowing my screen resolution, the only part they have any access to is their window.

    </rant>



  • @mallard said:

    <rant>

    What I'd really like to see is a way to make the "screen" object only return the size of my window, websites have no business knowing my screen resolution, the only part they have any access to is their window.

    </rant>

    ...get over it! did I see you in the high street, wearing a tinfoil hat last week?



  • Update: Same guy on different forum just had to ring someone's welkin with the banhammer for trying to flog pirate copies of Windows Vista. I mean, Jesus bloody wept...



  • @mallard said:

    <rant>

    ....websites have no business knowing my screen resolution, the only part they have any access to is their window.

    </rant>

    It's useful for websites gathering statistics about the hardware and software their users are using. For instance, I'd be interested in learning that almost all of my users are using at least a 1024x768 screen so I could target that as the min resolution for new sites.



  • @Jake Grey said:

    Update: Same guy on different forum just had to ring someone's welkin with the banhammer for trying to flog pirate copies of Windows Vista. I mean, Jesus bloody wept...

    I wouldn't mind flogging the makers of Windows Vista.



  • @Sunday Ironfoot said:

    @mallard said:

    <rant>

    ....websites have no business knowing my screen resolution, the only part they have any access to is their window.

    </rant>

    It's useful for websites gathering statistics about the hardware and software their users are using. For instance, I'd be interested in learning that almost all of my users are using at least a 1024x768 screen so I could target that as the min resolution for new sites.

     

    But that's Mallard's point. If you are running around with a full-screen window, the size of the window is damn-near the size of the screen. You have your stat. If they are in the habit of surfing in a 100x100 window (I dunno why), you get 100x100. Which is more useful for a "target" window size -- the window size you'll actually be using, or the maximum size they are capable of using, if they decided to grant you your wildest wet dream? It seems less common for Windows users, but Mac users routinely surf with a not-maximized browser, and I think they'd be a tiny bit miffed if you said "oh, you HAVE to maximize" to see my site.

     Target your audience's window size, not screen size. The only people that might care about actual screen size are people collecting statistics to put into those big books of statistics that I'm sure we've all read to know just how our office environment compares to the next. (Oh geez! Google employees get 14 150" screens! When are we getting an upgrade!?)



  • trying to scan down a column of text that's stretched the whole width of your wide-screen monitor is horrible.  i can't remember the last time i regularly used a maximised web browser, but it was probably around the time i stopped using a 13" screen.

     

     


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.