SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: safari's reader

Hybrid View

  1. #1
    Get my greedy down dotJoon's Avatar
    Join Date
    Apr 2003
    Location
    daejeon, South Korea
    Posts
    2,209
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    safari's reader

    Let's suppose I have blocks in my page.

    The first block is for advertizement.
    The second block is for contents.

    When users visit the page in Safari, I like to make the page that safari's reader button in the address box of the browser is shown for the second block although the text in the first block is longer than the text in the second block.

    The following is one for my trials, but failed.
    Code:
    <div id="1stBlock">advertizement</div>
    <article id="2ndBlock">contents</article>

  2. #2
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,225
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    Hi, dotJoon,

    As you know, we cannot diagnose anything from this code. If you can post a working example in a standalone page, we should be able to offer some suggestions. Otherwise, a link to your site (if you have one) would do.

    Please see these these messages if you need examples of standalone pages.
    http://www.sitepoint.com/forums/show...Posting-Basics

  3. #3
    Get my greedy down dotJoon's Avatar
    Join Date
    Apr 2003
    Location
    daejeon, South Korea
    Posts
    2,209
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ronpat View Post
    Hi, dotJoon,

    As you know, we cannot diagnose anything from this code. If you can post a working example in a standalone page, we should be able to offer some suggestions. Otherwise, a link to your site (if you have one) would do.

    Please see these these messages if you need examples of standalone pages.
    http://www.sitepoint.com/forums/show...Posting-Basics
    Thank you for your advice/teaching, ronpat.

    I guess I didn't explain fully what I want.

    These days, lots of people use mobile phone for surfing.
    The mobile phone has some advantages and disadvantages.
    I won't mention about advantage of the mobile phone.
    I'll say about one of disadvantages of the mobile phone.

    The monitor of the mobile phone is much smaller than the monitor of the deskTop.
    I like to say the small size of the monitor is one of disadvangtages fo the mobile phone.

    Because of the small size, The text of the contents is also very small when I surf in my mobile phone.
    It causes working hard in reading the contents.

    Apple suggest one of solution for this disadvantage.

    When I surf the internet, iPhone's browser named "safari" creating another button in the address box of the browser named "reader".
    I don't know the exact name of the button in English. I just translate it to English from my mother tongue.
    Anyway, let's call the button "reader".
    I guess if someone uses iPhone or iPad, he or she will probably know the button "reader".

    When I click the button "reader", it shows the contents only removing other stuffs.
    It makes me very easier to read the contents.

    I wonder how the apple's safari do this.

    One of my guessing is that the safari checks the length of the text of each block of the page.
    And it guess the longest text may be the main contents of the page.
    And make the button "reader" for the contents.


    I like to make my webPage interacting with the browser safafi.
    I like to make my page automatically created the button "reader" for my contents when user come to my page in safari.
    The contents usually has the longest text, the button is automatically shown when a user come to my page in safary.

    But some times, the contents is very short or the contents has not the longest text, the button is not automatically created or the button is created for other thing instead of the contents.

    I like to make my page always create the button "reader" for contents instead of other stuffs.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,598
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    Safari has that Reader button so that people can read the content and block out all the other rubbish on the page. It's basically for reading long amounts of text, such as blog posts.

    You could imitate that button with JavaScript, but a better option might be to use CSS. You can use @media rules to make the text bigger on small screens and set all kinds of different styles for the content.

    E.g.

    Code:
    @media only screen and (max-width: 600px) {
    	body {font-size: 150%;}
    	... more styles for elements here ...
    }


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
  •