SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,657
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    iPhone/iPad view source Bookmarklet

    Code:
    javascript:var%20sourceWindow%20%3D%20window.open%28%27about%3Ablank%27%29%3B%20%0Avar%20newDoc%20%3D%20sourceWindow.document%3B%20%0AnewDoc.open%28%29%3B%20%0AnewDoc.write%28%27%3Chtml%3E%3Chead%3E%3Ctitle%3ESource%20of%20%27%20%2B%20document.location.href%20%2B%20%27%3C/title%3E%3C/head%3E%3Cbody%3E%3C/body%3E%3C/html%3E%27%29%3B%20%0AnewDoc.close%28%29%3B%20%0Avar%20pre%20%3D%20newDoc.body.appendChild%28newDoc.createElement%28%22pre%22%29%29%3B%20%0Apre.appendChild%28newDoc.createTextNode%28document.documentElement.innerHTML%29%29%3B
    Just pop that into the bookmark address - name it view source - click the bookmark to see the source of any page!

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,214
    Mentioned
    457 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by EricWatson View Post
    Just pop that into the bookmark address - name it view source - click the bookmark to see the source of any page!
    Sounds cool, Eric. Can you elucidate on the install process a bit? "Just pop that into bookmark address" means nothing to me.

  3. #3
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,657
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Sounds cool, Eric. Can you elucidate on the install process a bit? "Just pop that into bookmark address" means nothing to me.
    I understand. There are a lot of things that mean nothing to me. Sort of like going about my daily job I guess. Easier to do than to explain the order. Here ya go...

    With your iphone or ipad copy and paste that code >> while on the same page you just copied the code bookmark the Sitepoint page >> rename it to "View Source" >> Save and exit >> Now on your iphone/ipad click on your bookmarks icon >> navigate to the folder you bookmarked "View Source" >> Click Edit in top right (on ipad) >> Click "View Source" bookmark you just made >> Click in the box under the name of "View Source" (AKA the URL address) >> Select all and backspace to delete >> paste in your code you copied in first step >> Exit >> load up a page >> and click the "View Source" bookmark you made >> If you did it right it should show the source code for the page.

    Lot of steps I guess for a simple thing.

    As a side note: You can do the same thing with firebug light.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,214
    Mentioned
    457 Post(s)
    Tagged
    8 Thread(s)
    Thanks for attempting to explain it, Eric. Of course, I can't even work out how to "copy and paste" on this ****ing iPhone, so I haven't gotten too far yet.

    Edit:

    OK, finally worked it out, after trying several failed online attempts to explain it. Unfortunately, after following all those steps a few times, I don't get any source view. O well ... I learned something, anyhow.

  5. #5
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,657
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Here try this page Ralph. Youll have a better copy paste with this. http://www.visibilityinherit.com/cod...ookmarklet.php. Sometimes it's hard to copy with scroll bars. So I got ride of them for iphone/ipad. I just tested it using my sites link and my iphone and it works perfect.

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,214
    Mentioned
    457 Post(s)
    Tagged
    8 Thread(s)
    Ha ha, thanks Eric. Worked that time.

    I'll tweet it.

  7. #7
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,657
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Ha ha, thanks Eric. Worked that time.

    I'll tweet it.
    Oh good I'm glad it worked for you

  8. #8
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,657
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    This one is even better http://snoopy.allmarkedup.com/

  9. #9
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,214
    Mentioned
    457 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by EricWatson View Post
    This one is even better http://snoopy.allmarkedup.com/
    Thanks. Will check it out.

    Have decided to try the easy way of implementing it (by doing it via desktop Safari). Now I just have to wait until iCloud updates. Seems to take forever. Does anyone know how to push it along, or why some things update and others never do (like some contacts)? The whole iCloud thing seems flaky at best to me. Sometimes I'll update a contact, and even days later that new info hasn't synched across devices, while other changes synch instantly. Just don't trust it at all.

  10. #10
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,657
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Cool I found a way to bring up the iPhone/iPad keyboard while putting that code in a div or pre. Otherwise the keyboard only pops up with form elements. Thats why most people drop it into textarea. That makes it easier to select all.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •