Skip to content

Instantly share code, notes, and snippets.

@HaydenElza
Created July 9, 2019 00:12
Show Gist options
  • Save HaydenElza/aa02695db7f24267d6d4c52e52a542f6 to your computer and use it in GitHub Desktop.
Save HaydenElza/aa02695db7f24267d6d4c52e52a542f6 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Survey Notes XL
// @namespace http://elza.me
// @version 0.1
// @description Default to XL images. Go big or go home!
// @author Hayden Elza
// @match http://digicoll.library.wisc.edu/cgi-bin/SurveyNotes/*
// @require https://code.jquery.com/jquery-latest.js
// ==/UserScript==
(function() {
'use strict';
$('a[href*="/cgi-bin/SurveyNotes/SurveyNotes-idx?"]').each(function() {
$(this).attr("href", $(this).attr("href") + '&isize=XL');
});
$(document).keydown(function(e) {
// Left
if(e.which == 37) {
$('.navtable tr:has(.navlink):contains("Page")').each(function() {
window.location.href = $(this).find(":nth-child(2) a").attr("href");
});
// Right
} else if(e.which == 39) {
$('.navtable tr:has(.navlink):contains("Page")').each(function() {
window.location.href = $(this).find(":nth-child(4) a").attr("href");
});
}
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment