rccharles

Q: Hiroto, javascript fix for ASC.

Request: Copy page movement info to above the question.

 

I saw a post were you authored some JavaScript for injection into an ASC page via GreaseMonkey.  I use Firefox 47.0 as my web browser.

Hiroto (followup question)

I was wonder if you would consider writing a little more JavaScript.

 

On a multi page post, it's a big pain to have to scroll down so you can skip to the next or last page.   I was hoping you might be able to copy this info above the question.  I rather it be copied then moved, but move is better than letting the movement info were it is.

Screen Shot 2016-06-28 at 1.41.02 PM.png

 

To be clear, this is the stuff I want copied.

 

Screen Shot 2016-06-28 at 1.46.35 PM.png

Should the thread be one page, some indication should be placed there instead.  "one page only" , "page 1 of 1" etc.

 

Thanks in advance,

 

R

PS. perhaps this could be done via css.  Move the relative modified to some other place.

Mac mini, OS X Yosemite (10.10.5), Fall 2014; iPhone 4 7.1.2

Posted on Jun 28, 2016 11:00 AM

Close

Q: Hiroto, javascript fix for ASC.

  • All replies
  • Helpful answers

Page 1 Next
  • by Hiroto,Solvedanswer

    Hiroto Hiroto Jun 28, 2016 2:34 PM in response to rccharles
    Level 5 (7,276 points)
    Jun 28, 2016 2:34 PM in response to rccharles

    Hello

     

    The simplest would be to pin the pagination navigator to the top right corner of the view port by CSS.

     

    The following will move the first pagination navigator to the top right corner of the screen view port. It will stay there and may be annoying in another sense, though.

     

     

    @-moz-document
        domain(communities.apple.com),
        domain(discussions.apple.com),
        domain(discussionsjapan.apple.com),
        domain(discussionskorea.apple.com),
        domain(discussionschinese.apple.com)
    {
        @media screen {
            .j-thread .jive-thread-messages .j-pagination:first-child {
                position: fixed !important;
                top: -30px !important;
                right: 0px !important;
            }
        }
    }
    

     

     

    As for javascript solution, it would be possible but not simple. Not enough spare time for that now...

     

    Good luck,

    H

  • by rccharles,

    rccharles rccharles Jun 28, 2016 3:20 PM in response to Hiroto
    Level 6 (8,439 points)
    Classic Mac OS
    Jun 28, 2016 3:20 PM in response to Hiroto

    I didn't know fixed let you address the screen via fixed coordinates. I didn't think it was possible to do what I want via css. 

     

    No need for Javascript!

     

    R

  • by ChitlinsCC,

    ChitlinsCC ChitlinsCC Jun 28, 2016 3:36 PM in response to Hiroto
    Level 5 (7,448 points)
    Notebooks
    Jun 28, 2016 3:36 PM in response to Hiroto

    Nifty = PINNED to a spot = with tt2's "Minimal" invoked, I needed to change "TOP" value to "-20" to avoid getting involved with the Header... else it is not intrusive at all with replies as one scrolls down the page.

    IF no multi-page, it is not there at all!

    Thanks.

  • by Hiroto,

    Hiroto Hiroto Jun 30, 2016 5:56 AM in response to rccharles
    Level 5 (7,276 points)
    Jun 30, 2016 5:56 AM in response to rccharles

    Hello

     

    I noticed some element may hide the pagination navigator behind. So added z-index property to show it at top.

     

     

    @-moz-document
        domain(communities.apple.com),
        domain(discussions.apple.com),
        domain(discussionsjapan.apple.com),
        domain(discussionskorea.apple.com),
        domain(discussionschinese.apple.com)
    {
        @media screen {
            .j-thread .jive-thread-messages .j-pagination:first-child {
                position: fixed !important;
                top: -30px !important;
                right: 0px !important;
                z-index: 9999 !important;
            }
        }
    }
    

     

     

    All the best,

    H

  • by ChitlinsCC,

    ChitlinsCC ChitlinsCC Jun 30, 2016 7:47 AM in response to Hiroto
    Level 5 (7,448 points)
    Notebooks
    Jun 30, 2016 7:47 AM in response to Hiroto

    the Page # navigation at the top right seem to be on TOP of the Apple HEADER (Very Dark Gray BG). It is difficult for me to see on my laptop display without "just the right angle of the screen"

    screenshot-discussions apple com 2016-06-30 09-35-04.png

    I can change the value for "top" to "-20" to move it DOWN 10 pixels - seems perfect for my Firefox browser display

    screenshot-discussions apple com 2016-06-30 09-39-46.png

  • by Hiroto,

    Hiroto Hiroto Jun 30, 2016 8:41 AM in response to ChitlinsCC
    Level 5 (7,276 points)
    Jun 30, 2016 8:41 AM in response to ChitlinsCC

    Ah, I see. I have already removed the useless global navigation block at the top by means of:

     

     

    @-moz-document
        domain(communities.apple.com),
        domain(discussions.apple.com),
        domain(discussionsjapan.apple.com),
        domain(discussionskorea.apple.com),
        domain(discussionschinese.apple.com)
    {
        #global-nav-wrapper {display: none !important; }
    }
    

     

     

     

    That's why I used top: -30px for floating pagination nagiator. Please adjust the offset as you see fit.

     

    Regards,

    H

  • by ChitlinsCC,

    ChitlinsCC ChitlinsCC Jun 30, 2016 9:08 AM in response to Hiroto
    Level 5 (7,448 points)
    Notebooks
    Jun 30, 2016 9:08 AM in response to Hiroto

    [chuckle]

    The "personal preference" CSSes are getting unmanageable for me

    I am getting quite fond of tt2's Minimal w/ your Page# and now "Poster LEFT of Message"

    I have reduced tt2's FontSize to 16px

     

    If I could take the time to decipher all the individual "features", I would make up a bunch of "feature set" CSSes for ease of switching them on and off as one's taste dictates.

     

    Your page # script is a fine example of an "ala carte" script - and tt2's Minimal is one of a "set of features"

     

    Thanks for your continued efforts, amigo.

  • by ChitlinsCC,

    ChitlinsCC ChitlinsCC Aug 3, 2016 8:21 AM in response to Hiroto
    Level 5 (7,448 points)
    Notebooks
    Aug 3, 2016 8:21 AM in response to Hiroto

    Howdy Hiroto

     

    It seems that the "floating" (actually fixed) page # controls have NOW been defeated somehow.

    Change Forum Username

    https://discussions.apple.com/thread/6662752?start=15&tstart=0

    is page two of a MULTI-page thread

    near the bottom of page #2 - notice no PageNav at top right of image

    screenshot-discussions apple com 2016-08-03 10-12-33.png

    PageNav FIRMLY anchored at bottom right

    screenshot-discussions apple com 2016-08-03 10-13-09.png

    The best laid plans of mice and men often go awry...

    adapted from a line in “To a Mouse,” by Robert Burns : “The best laid schemes o' mice an' men / Gang aft a-gley.”

  • by ChitlinsCC,

    ChitlinsCC ChitlinsCC Aug 3, 2016 11:19 AM in response to ChitlinsCC
    Level 5 (7,448 points)
    Notebooks
    Aug 3, 2016 11:19 AM in response to ChitlinsCC

    Found that I needed to change the "top" value to a POSITIVE 60 from "-20" that was working before... go figger

  • by rccharles,

    rccharles rccharles Aug 3, 2016 12:01 PM in response to ChitlinsCC
    Level 6 (8,439 points)
    Classic Mac OS
    Aug 3, 2016 12:01 PM in response to ChitlinsCC

    Did chitlinsCC have some css for me to test?  I saw something, but cannot find it now.  Seems like you cured the issue.

     

    POSITIVE 60 from "-20"

    curious.  I think absolute is actually relative.  It absolute is relative to the current relative keyword.  Apple may have added a relative or change location of relative. I'd sure like a css tag that is relative to a named html class or id.

     

    R

  • by Hiroto,Helpful

    Hiroto Hiroto Aug 3, 2016 2:06 PM in response to ChitlinsCC
    Level 5 (7,276 points)
    Aug 3, 2016 2:06 PM in response to ChitlinsCC

    Hello

     

    They have introduced .j-pagination.top with different margin that is the reason why we need to adjust our rules accordingly. Something like the following.

     

     

    /*
        file:
            pagination on top.css
    
        function:
            let the first pagenation navigator float on top right corner of screen view port
    
        version:
            v0.11
                - adjusted to new site style
                    selector    => .j-pagination.top
                    margin      => 0px
                    top         => 50px (w/ global nav)
                    top         => 5px  (w/o global nav
    */
    @-moz-document
        domain(communities.apple.com),
        domain(discussions.apple.com),
        domain(discussionsjapan.apple.com),
        domain(discussionskorea.apple.com),
        domain(discussionschinese.apple.com)
    {
        @media screen {
            .j-thread .jive-thread-messages .j-pagination.top {
                margin: 0px !important;
                position: fixed !important;
                top: 50px !important;
    /*
                top: 5px !important;
    */
                right: 0px !important;
                z-index: 9999 !important;
            }
        }
    }
    

     

     

    Regards,

    H

  • by ChitlinsCC,Helpful

    ChitlinsCC ChitlinsCC Aug 3, 2016 2:07 PM in response to Hiroto
    Level 5 (7,448 points)
    Notebooks
    Aug 3, 2016 2:07 PM in response to Hiroto

    curiously, I am loading ONLY the PageNav code AND tt2's Minimal - how could your subsequent changes to some other parameter affect stuff carved in stone on my computer

    Really irrelevant as I discovered my "sweet spot" was "60"

    new-blank.png

  • by ChitlinsCC,

    ChitlinsCC ChitlinsCC Aug 3, 2016 1:17 PM in response to rccharles
    Level 5 (7,448 points)
    Notebooks
    Aug 3, 2016 1:17 PM in response to rccharles

    Good thinkin process, methinx...

    I would define:

    • relative as some x, y coordinate starting point of a PAGE
    • absolute as x, y coordinate of the browser window's display OF the page - why absolute makes the controls appear to float over the page

    (I guess it must be top RIGHT, since the values are small)

  • by rccharles,

    rccharles rccharles Aug 3, 2016 6:26 PM in response to ChitlinsCC
    Level 6 (8,439 points)
    Classic Mac OS
    Aug 3, 2016 6:26 PM in response to ChitlinsCC

    I'll dream on about CSS being changed for me.  I am understanding it better.

     

    R

Page 1 Next