Script Summary: Styling and readability updates to MGoBlog.com
Version 2 - The structure of the code has changed to better prevent conflicts between the jQuery actions used in this script and those native to MGoBlog. This has fixed the root of several problems that up until now had been fixed by work-arounds. It should also make future updates to the script less likely to cause unintentional negative consequences.
This script provides the following presentation and usability tweaks to mgoblog.com:
- Fixes paging through old MGoBoard topics. As of version 1.5 of this script, this fix applies to ALL tabs (including "Recent" and "Hot") on the board pager. See note below for more information
- As of version 1.6, paging through all tabs of diaries is also fixed.
- As of version 2.0, paging through archives is also fixed.
- Comment links and Read More links will link immediately to the corresponding content on the page, instead of the top of the page. Note: Read More links on MGoBlog were recently updated so they work the way they're supposed to. I have thus removed my added Read More functionality from the working links. Old (non-working) Read More links will still be fixed by this script.
- Tables and text that overflow the margins of the main column will be condensed so they fit.
- As of version 2.0, YouTube videos throughout the site (including those in comments and blockquotes) will be formatted as widescreen and dynamically sized to fill the width of their parent container. Prior to 2.0, this is only true for YouTube videos in the main content column.
- Recently the blog started using a lightbox for linked YouTube videos. Sometimes these links are not set up properly, resulting in the video opening in a new tab/window instead of the lightbox. As of version 2.1, this script sniffs out all links that point directly to a YouTube video and are not already set up to use the lightbox and attaches the lightbox functionality to them. This includes links in diaries and board posts where the functionality would otherwise be unavailable.
- To facilitate the One Frame at a Time series, as of version 2.2.0 this script preloads all GIF files that are linked to. This means that from the moment the page is loaded, it will start loading all of the lightboxed GIF files to decrease each GIFs load time when it's opened. Since the loading takes place asynchronously, page performance will not be affected while the preloading is taking place.
A quick technical note on YouTube embeds: some of the embeds on the site use the Object/Embed method, and others use iFrames. This script converts all embeds to iFrames, as they behave much more consistently that Object/Embeds.
Board Pager Note: Paging through "Recent" and "Hot" threads now works, although paging through those two tabs will sometimes cause the other tabs to reset to page one. At the moment, I don't consider this much of an issue, but if I notice a fixable pattern with when and how this happens, I may address it in a future update.