Jump to content


Embedded Tweets Loading Sooner


Recommended Posts

Is there a way to get the tweet embedding script to run before whatever script takes you to the last read post in a thread? It's annoying when you click on it to take you to where you left off, only for you to then have to scroll down a ways because all of the tweets loaded after the fact and the browser position doens't compensate.

Link to comment

Good news, bad news. It's most likely possible that we can change it so the embedding runs prior to the "jump to first unread post" event. We'd have to locate where each runs. The embedding is most likely buried in an XML file; when we wrote the code for them, we had to do it as an XML file and then import it, so I'm pretty sure that it was written to one of the board's XML file. The "jump" function - not sure about that. Best guess on that is that it's a JavaScript that's called as a function. Assuming we can locate those, most likely we could do it. That's all the good news.

 

The bad news is that even if we did it, it probably won't help much. The embedding simply replaces the HTML that points to the tweet with HTML that can be embedded. The problem is that once that happens, the board has to go out to that "new" URL and pull down the tweet. The big problem is bandwidth and the speed in which the contents of the tweet can be pulled. I can't think of a way to tell the "jump" function how to tell that all embedded material has completely loaded, which is what would be needed. So, even if we changed it, what would happen is that the "embed" function would run and replace the "bad" URL with the "good" URL. Then, the "jump" function would fire - but it would not have a way to know how long to delay firing so that all the content would be loaded. So, even after the "new" URL is created, the "jump" would still occur prior to all the content of the tweet was pulled and rendered.

 

Having said all that, I'm not the most skilled coder by any means. It's possible that DaveH or zoogs might be able to come up with an idea.

Link to comment

Well, yes and no. What I've noticed is that for "gif-heavy" threads, the same problem occurs (at least for me). It doesn't occur when there are only a few gifs in the thread. So, I think the issue remains; there's no way to delay the firing of the "jump to" because there's no way for the board to tell when all the external content has loaded. I could be wrong - won't deny it - but I do see the same issue with gifs when there are a LOT of them in a thread.

Link to comment

Without looking into it, it would likely be pretty tough to do and not really worth the time.

 

There is a ton of code and templating that goes on in board software that trying controlling the load or script execution order would likely make you want to kill someone.

Link to comment
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.

Visit the Sports Illustrated Husker site



×
×
  • Create New...