+ Reply
Results 1 to 6 of 6

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: 'View Source for Safari' Allows You to View Web Page Source Code on Your iPad

is a discussion within the

iPad News

forums, a part of the

General iPad

section;
...
  1. #1
    MMi Staff Writer Anthony Bouchard's Avatar
    Join Date
    Sep 2011
    Location
    Florida
    Posts
    7,128
    Thanks
    217
    Thanked 1,044 Times in 766 Posts

    Default 'View Source for Safari' Allows You to View Web Page Source Code on Your iPad


    One of the beloved features of any full-blown desktop Web browser is the ability to view the page source. The page source feature allows you to view the HTML code behind the Web site you’re viewing. Mobile Safari on the iPhone and iPad does not include this feature, but with a new free jailbreak tweak dubbed View Source for Safari by iOS developer Árpád Goretity, you can now have the ability to view a Web page’s source code whenever you like.

    Shown above is an example of what the tweak looks like when you use it. The source code is written on a very wide-open white space that takes up the whole screen and is typed in code-like courier new font because it’s a classic for coding. At the top of the interface you have two buttons – one on the left and one on the right – the right one being “Done” for exiting the interface and the left one being “Print” for printing the Web page’s source code on an AirPrint-enabled printer from your iPad.

    To show the Web page's source code, you must tap on the Action button at the top of the Mobile Safari Web browser and a prompt will appear just like the one below:



    The prompt has two buttons – “View Source” and “Details.” Tapping on the View Source button will open the Web page’s source code interface as explained earlier and tapping on the Details button will show the normal options that you see when you normally tap on the Action Button in Mobile Safari, such as adding the page to your home screen, bookmarking it, or adding it to your reading list.

    Unfortunately the tweak is only for the iPad, but a tweak like this would be wonderful to have the iPhone or iPod touch too (developers, are you getting this?). The tweak could serve useful for anyone interested in Web design that wants to learn more about the HTML code behind Web sites; Web developers may also find it useful. View Source for Safari has no options to configure. Since the tweak is free and seamlessly adds a useful functionality, I’d have to say this tweak is worth grabbing.

    Name: View Source for Safari
    Price: FREE
    Version: 0.1
    Requirements: iPad, iOS 5
    Repo: BigBoss
    Developer: Árpád Goretity
    Editor's Rating:  4/5

  2. #2
    iPhone? More like MyPhone Alluziion's Avatar
    Join Date
    Aug 2010
    Location
    Wales, UK.
    Posts
    113
    Thanks
    0
    Thanked 6 Times in 5 Posts

    I'be been waiting for this for a very long time! I'm surprised that none of the currently released browsers have provided such support; hopefully they will add the functionality to the Chrome browser.

  3. #3
    iPhone? More like MyPhone
    Join Date
    Mar 2008
    Posts
    271
    Thanks
    27
    Thanked 44 Times in 34 Posts

    Quote Originally Posted by Alluziion View Post
    I'be been waiting for this for a very long time! I'm surprised that none of the currently released browsers have provided such support; hopefully they will add the functionality to the Chrome browser.
    Save this as a bookmark.

    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
    Apple are Control freaks we need to stop them before they take over the world!!

  4. #4
    Green Apple
    Join Date
    Aug 2012
    Posts
    45
    Thanks
    0
    Thanked 1 Time in 1 Post
    Pretty standard on desktop. I have no idea why anyone would need this though. If you really gave a **** about a mobile websites source you would have spoofed your browser like a real dev does it

  5. #5
    What's Jailbreak?
    Join Date
    May 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    nice!

  6. #6
    Developer NetMage's Avatar
    Join Date
    Aug 2007
    Location
    Virginia
    Posts
    1,296
    Thanks
    72
    Thanked 210 Times in 168 Posts

    I just have bookmarklet's in my bar for Top, Bottom and View Source!

    View Source:
    Code:
    javascript:(function()%7Bvar%20a=window.open('about:blank').document;a.write('%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3Ctitle%3ESource%20of%20'+location.href+'%3C/title%3E%3Cmeta%20name=%22viewport%22%20content=%22width=device-width%22%20/%3E%3C/head%3E%3Cbody%3E%3C/body%3E%3C/html%3E');a.close();var%20b=a.body.appendChild(a.createElement('pre'));b.style.overflow='auto';b.style.whiteSpace='pre-wrap';b.appendChild(a.createTextNode(document.documentElement.innerHTML))%7D)();
    Top:
    Code:
    javascript:document.body.scrollTop=0;
    Bottom:
    Code:
    javascript:document.body.scrollTop=document.body.scrollHeight;
    Last edited by NetMage; 09-07-2012 at 08:29 PM.

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