Skip to content

Instantly share code, notes, and snippets.

View mreidsma's full-sized avatar

Matthew Reidsma mreidsma

View GitHub Profile
@mreidsma
mreidsma / summon_wording.js
Created February 25, 2014 18:42
Reword Scholarly/Peer-review facet label in Summon 1.0
// Reword the Scholarly Facet to be more readable
$('label[for="facet:is_scholarly"]').text('Peer-reviewed and other scholarly publications');
@mreidsma
mreidsma / about.markdown
Last active August 29, 2015 13:56
Clean up Sierra non-Keyword search results pages

Clean up No Results pages on non-keyword searches in Sierra

The default no results pages in Sierra's OPAC often confuse our patrons, and we've struggled with how to make these screens more intuitive to users. The original screen shows nearby results (for title, author, journal title, etc. searches) and places a box where the patron's search would be if we had it. In some cases, help prompts for switching to a keyword search, searching MelCat (the state-wide consortium), or inverting author names to the last first order are also included. But our patrons never seem to see this box, and often don't realize that they haven't gotten any results. (Sierra defaults the No Results message to red, which made them think they'd made a mistake. We changed it to black but now it's invisible.)

Default keyword search result screen

*The default non-keyword results screen

@mreidsma
mreidsma / about.markdown
Created February 27, 2014 18:36
Add extra Peer-review facet to Content Type box in Summon

Add Extra Peer-review Facet to Content Type Box in Summon

We get a lot of folks who can't see the first set of limiters in Summon (1.0 OR 2.0). A large group of folks scroll right to "Content Type" and start looking for peer-review filters. (They aren't there.) Today in a usability test, we saw all of our testees do this in Summon 2.0. One of our librarians thought we should just add a Peer-review facet to the Content Type section, so that's what this does.

Caveats

  • It doesn't give the nice "updating" screen while it reloads
  • I haven't tested it like crazy so it might not save all limiters in all situations
  • This is a rough draft. I'll probably work on a fancier version soon.
  • This version works in Summon 1.0 only.
@mreidsma
mreidsma / about.markdown
Last active August 29, 2015 13:58
Add a preview banner to Summon 1.0 to let folks try Summon 2.0.

Summon 2.0 Preview Banner

I wanted a way to add a banner to our Summon 1.0 site to give folks a heads-up that we will be switching to the 2.0 interface soon. But mostly I want folks to have a chance to play with the new search. I wrote a simple banner that is injected with JavaScript on page load that includes a close button. If a patron clicks the close button, the script will set a cookie called "noPreview" that will prevent the preview banner from showing up for 7 days.

What the script does

This is probably the last script I'll write for Summon 1.0. That makes me kind of sad.

The cookie functions are verbetim from the master, ppk: http://www.quirksmode.org/js/cookies.html

@mreidsma
mreidsma / drafts_actions.markdown
Last active August 29, 2015 14:04
Drafts.app for iOS URL Actions

URL Actions for Drafts.app on iOS to interface with my other favorite apps

Vesper

Vesper isn't supposed to have a URL scheme, although they've said one is "coming soon." It has at least a basic one, though, where you can get the app to open. I tried a bunch of different commands to add text, but either the scheme isn't that developed or I need to know more about James Bond's cocktails to use it. Here's what I do now: copy text from Drafts.app and open Vesper. Then I manually paste it in place and add tags.

drafts://x-callback-urlcreate?text=[[draft]]&action={{Copy to Clipboard}}&afterSuccess=Delete&x-success={{vesper://}}

DashPlus

@mreidsma
mreidsma / lg-nonono.css
Created October 7, 2014 15:37
Hide Subject Landing Page and Expert links in LibGuides Homepage
.panel-body .alert.alert-info {
display: none;
}
@mreidsma
mreidsma / about.markdown
Created November 6, 2014 17:08
Check for a keyword in III search, append if not in search query

Check query for search term, add on submit if not there

One of our librarians needed a way to limit searches to the catalog to atlases. However, the only good way to do that in our OPAC is by using the keyword "Atlas" with whatever other keywords you are searching. Since that's not always going to happen, I wrote a quick script that will check the search query for the keyword "atlas," and if it doesn't find it, will append it. This might be useful for other projects, as well.

@mreidsma
mreidsma / about.markdown
Created May 26, 2015 17:07
Sierra's Failed Renewal Messages Stink

Fixing the unhelpful renewal failed message in Sierra

This little script puts the failed renewal message in a more intuitive place, and lets you customize the text. This is the before and after of GVSU's OPAC:

Before and after of this script

@mreidsma
mreidsma / index.html
Last active August 29, 2015 14:22
open new compose window for Gmail bookmarklet
<!DOCTYPE html>
<html>
<head>
<style>
body { font-family: Helvetica, Verdana, sans-serif; }
</style>
</head>
<body>
<p>This bookmarklet will open a new window set to compose an email if you are logged in to your Gmail account. That way if you need to send an email, you won't have to see how full your inbox has become.</p>
<h2>Installing</h2>
@mreidsma
mreidsma / getHours.php
Created June 25, 2015 19:58
Script to scrape hours from the GVSU library website
<?php
// Requires the simple html dom parser
include ('simple_html_dom.php');
$html = file_get_html('http://gvsu.edu/library/hours.htm');
$i = 0;
echo '<ul id="realtime-hours">';