Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Abolute images path

#4

Hi,

When using an absolute images path in the options it doesn't make the expected result :

'/images/pushup/' => JavascriptLocation+'/images/pushup/'

Reported by Sébastien Grosjean - ZenCocoon · August 3rd, 2008 @ 09:24 AM

State: new
Milestone: 1.0.1
Assigned to: Nick Stakenburg Nick Stakenburg

Activity

  1. stuartloxton
    stuartloxton

    Hi,

    I noticed that error to, I've also alerted Nick to the problem. The solution is to use a better regular expression. I can up with this one yesterday (not tested) but pretty sure it will work:

    Replace line 70 of pushup.js:

    if (this.options.images.indexOf('://') > -1)
    

    with:

    if(/^(https?:\/\/|\/)/.test(this.options.images)) 
    

    It SHOULD work, hope it helps

    August 3rd, 2008 @ 12:06 PM

  2. Nick Stakenburg
    Nick Stakenburg
    • Milestone set to 1.0.1

    Thanks, not sure if this is going to work with the PNG images in IE6 though. That'll need some testing before I implement this.

    August 3rd, 2008 @ 12:31 PM

  3. Sébastien Grosjean - ZenCocoon
    Sébastien Grosjean - ZenCocoon

    I've just tested

    on Mac:
    - FF 3.0.1 - Safari 3.1.2 - Opera 9.51

    on Win:
    - IE 6 - IE 7 - Firefox 2.0.0.16 - Opera 9.25 - Safari 3.1

    And all looks fine to me with the images (just some small problems with CSS on mac Opera 9.51, I give a look at it).

    August 3rd, 2008 @ 01:11 PM

  4. stuartloxton
    stuartloxton

    The regex should only extend the functionality already there, and I've tested it so it only accepts http, https and /.

    August 3rd, 2008 @ 02:18 PM

  5. Nick Stakenburg
    Nick Stakenburg
    • State changed from new to resolved

    Thanks, I've pushed the fix into 1.0.1.

    Will add a changelog later to track these updates.

    http://github.com/staaky/pushup/...

    August 3rd, 2008 @ 02:24 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.