Snoopy: View page source code on your iDevice

Discussion in 'iOS Development' started by Ryan989, Sep 28, 2010.

  1. Ryan989

    Ryan989 New Member

    Joined:
    Sep 18, 2010
    Messages:
    49
    Likes Received:
    0
    Device:
    iPad w/ 3G
    So I was visiting a website I'm rebuilding on my iPad yesterday. I quickly noticed it didn't look anything like the desktop version I'd built, it had all these blank spots and the formatting was way off. So I was searching for a way to view the source of the page on my iPad, and found this..

    Please Register or Log in to view images


    http://Snoopy.allmarkedup.com

    It's called Snoopy, and it works like a charm. Even if a page has blocked you from seeing it's source, Snoopy will build a replica. It runs from the Safari App as a bookmark.

    He's the code that goes into the bookmark.
    HTML:
    javascript:(function()%7Bvar%20d%3Ddocument%2Cs%2Ce%3Bvar%20el%3Dd.getElementById('snpy')%3Bif(typeof%20Snoopy!%3D'undefined')%7BSnoopy.toggle()%3Breturn%7Delse%20if(el)%7Bel.className%3D%2Fclosed%2F.test(el.className)%3Fel.className.replace('closed'%2C'')%3Ael.className%2B'%20closed'%3Breturn%7Ds%3Dd.createElement('link')%3Bs.setAttribute('href'%2C'http%3A%2F%2Fsnoopy-assets.allmarkedup.com%2Fsnoopy-min.css')%3Bs.setAttribute('rel'%2C'stylesheet')%3Bs.setAttribute('type'%2C'text%2Fcss')%3Bd.getElementsByTagName('head')%5B0%5D.appendChild(s)%3Be%3Dd.createElement('script')%3Be.setAttribute('src'%2C'http%3A%2F%2Fsnoopy-assets.allmarkedup.com%2Fsnoopy-min.js')%3Bd.getElementsByTagName('body')%5B0%5D.appendChild(e)%7D)()%3B
    Cheers.

    edit: thanks
  2. Pelaez-1

    Pelaez-1 New Member

    Joined:
    May 5, 2008
    Messages:
    822
    Likes Received:
    0
    Device:
    iPhone
    Use code tags instead of quotes

Share This Page