Bookmarklet for sorting the events list (Shaw Trust portal website).
Release history
- Version 1.0 - Apr 2022.
- Initial release.
- Version 1.1 - Apr 2022.
- Now works with Firefox web browser.
Overview
Normally on the Shaw Trust Portal website, searching for upcoming events does not give the results in chronological order. This little tool fixes that. As a bonus it also resizes the events list to fill the height of the page.
It works using a special bookmark. Whenever you search the Events page just remember to click the bookmark to sort the events list in chronological order. You can click the bookmark either before or after doing the search.
Getting Started
- Ensure your bookmarks bar is visible at the top of your web browser.
- In Safari (Mac): Select menu option View > Show Favourites Bar.
- In Mobile Safari (iPad): Go to the Settings app. Select Safari > Show Favourites Bar.
- In Brave: Select menu option View > Always Show Bookmarks Bar.
- In Firefox: Select menu option View > Toolbars > Bookmarks Toolbar > Always Show.
- In Chrome: Select menu option View > Always Show Bookmarks Bar.
- In Microsoft Edge: Select menu option View > Always Show Favourites Bar.
- Drag Sort events (Shaw Trust Portal) to your bookmarks bar.
- Visit the Shaw Trust website. Sign in and then select the "Events" page.
- Type something into the "Search Events by Keyword" box. For example, type "Welcome".
- Observe that the results are currently not in chronological order!
- Click the bookmark you added earlier.
- Observe that the results are in order. All done!
- If you do another search, the results should automatically be put in order. No need to click the bookmark again.
Privacy
- All bookmarklets work by inserting client-side Javascript code into the Web page. You can see the full code below with commentary to see what it's doing. The Web page already contains masses of Javascript, so this script uses its own namespace to avoid unexpected side-effects.
- This script does not cause any information to leave the Web page. That is, no external services are communicated with, no data is stored locally or remotely, and no external scripts or libraries are used - it consists of only the basic script inside the bookmark itself.
- I'm not a member of staff at Shaw Trust and it's not endorsed in any official capacity. Please use at your own risk!
- As with all bookmarklets, the effect is temporary. Once you close, reload or refresh the Web page, all Javascript from this bookmarklet is removed from the page. You'll need to click the bookmarklet again to reapply world order.
Notes
- This bookmarklet has been tested with Safari (Mac), Mobile Safari (iPad), Firefox, Brave, Google Chrome and Microsoft Edge. It has not been tested with Internet Explorer - let me know if it works for you!
- If you don't see the menu tabs along the top of the Web page (see screenshot above) then it probably means you're looking at the mobile version of the site. Try resizing your browser window.
- Using the Favourites Bar probably isn't necessary for the bookmarklet to work, depending on the browser you're using. It just keeps things simple. Feel free to put the bookmark elsewhere instead.
- Feel free to share this bookmarklet or modify it for other Web sites. It's free. Please include attribution.
- Comments or bug reports welcome. E-mail me at ant at greenalien dot com.
- Why did I make this bookmarklet? I wanted a little project to try out a new code editor (Nova by Panic). And well, listing time-related things out of chronological order just accelerates the entropy of the universe. If you'd be interested in a generalised version of this bookmarklet which orders lists on other Web sites, let me know.
- I'm aware the instructions got a bit convoluted mentioning various Web browsers. I'll revisit this time permitting.
- Are you new to bookmarklets? Here's a few other useful ones for Wordpress, Facebook, Reddit etc.
Manual setup (optional)
If you can't drag the bookmarklet to your bookmarks (as mentioned in step 2 above) then you can instead set it up manually.
- Add a bookmark the usual way for this webpage (i.e. bookmark the webpage you're looking at right now!) Make sure you save it to your favourites.
- In Safari (Mac): Select Bookmarks > Add Bookmark
- In Mobile Safari (iPad): Press the share button (the square with upwards arrow) > Add to Favourites.
- In Brave: Select menu option Bookmarks > Bookmark This Tab.
- In Firefox: Select menu option Bookmarks > Bookmark Current Tab.
- In Chrome: Select menu option Bookmarks > Bookmark This Tab.
- In Microsoft Edge: select menu option Favourites > Add This Page To Favourites.
- Edit the bookmark you just added. The bookmark will be named "Sort events (Shaw Trust Portal)" by default. Feel free to rename this.
- In Safari (Mac): Right-click on the bookmark and select Edit Address.
- In Mobile Safari (iPad): Press the top-left button to show the sidebar. Select Bookmarks > Favourites > Edit button. Select the Sort Events...bookmark.
- In Brave: Right-click on the bookmark and select Edit.
- In Firefox: Right-click on the bookmark and select Edit Bookmark.
- In Chrome: Right-click on the bookmark and select Edit Bookmark.
- In Microsoft Edge: Right-click on the bookmark and select Edit.
- Replace the bookmark's address (or 'URL') with the following text:Please enable Javascript to see the code here.Copied
- All done. To try it out, return to the Getting Started section at the top of this page - This manual setup replaces step 2, so skip that step.
Behind the scenes
If you want to know exactly what this bookmarklet is doing, here's the code in full. It's identical to the code shown above but with comments (shown highlighted) and formatting.
Enable Javascript to see this.