Skip to content

Instantly share code, notes, and snippets.

@rajiteh
Created September 9, 2014 09:16
Show Gist options
  • Save rajiteh/73ad36b5baad6831f30c to your computer and use it in GitHub Desktop.
Save rajiteh/73ad36b5baad6831f30c to your computer and use it in GitHub Desktop.
Hover over the Award link text instead of opening a popup window to quickly read award descriptions in YorkU's SFP application.
//Execute the following javascript at the Award selection page of SFP and wait for the message 'success! :)'
var script = document.createElement("script");
script.src = "https://code.jquery.com/jquery-2.1.1.min.js";
script.type = "text/javascript";
document.getElementsByTagName("head")[0].appendChild(script);
var interval = setInterval(function() {
if (typeof jQuery === "function") {
clearInterval(interval);
jQuery(function($) {
var $dom = $('a[target="awardDescription"]')
var len = $dom.size();
var i = 0;
$dom.each(function() {
(function($link) {
$.get($link.attr('href'), function(data) {
$link.attr('title', $(data).text());
if (++i == len) {
alert('Success! :)')
}
});
})($(this));
});
});
}
}, 500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment