Forum:Son of Better pengLocations
Almost a year ago, there was some discussion on AR about improving the [[MediaWiki:Common.js/pengLocations.js|pengLocations script]] used on Distractions and Diversions Locations/Penguin Hide and Seek, but it was dropped rather than resolved. The pengLocations script started (and is still mostly implemented) as a light table. It was suggested to take up the issue again here rather than AR if there was anything new to discuss.
Disclaimer: I have no intention of stepping into a completely different issue, however similar it may seem at first.
I've made improvements of my own based on some of what Tyilo did before and on what some users, but mostly Chrislee33, have been adding to the PHS Locations page every week. I'd like to collect feedback and soon implement the improved script.
To see it in action, users need to include User:Saftzie/Beta.js in their skin.js (wikia.js or monobook.js).
Currently it applies to a mock-up at User:Saftzie/Beta. The page name would have to be edited for implementation. The implementation page names are in a comment.
- A new, additional button toggles between the full list and the "short list" view of the table.
- There is no longer a need to add a second table to the page displaying a subset of the columns from the first (for people who have smaller/narrower displays or who otherwise don't want to scroll).
- The default view is the "short list."
- The script is somewhat independent of the table layout.
- The total number of columns is calculated, rather than hard-coded.
- The total number of penguins (and the bear) is calculated, rather than hard-limited. (The current hard limit is 20, so that's not so big a deal.)
- The columns to have toggle-able visibility are set (and changeable) in the table itself by adding class="pengToggle" to the headers of the individual columns. The rest of the table is unchanged, so maintaining it and updating it every week is the same user experience.
- The table ID is changed from penglocations to pengLocations, just because of, you know, the L.
Support - As author. Under the assumption that older browsers would be the least compatible, I've tested with IE8 (Windows) and FF3.5 (Linux, c. 2010, before the version jump). Although they're not really that old, I'm confident it's good. --Saftzie (talk) 12:35, January 3, 2013 (UTC)
Support - Everything looks good. Hair 04:02, January 4, 2013 (UTC)