Last active
April 20, 2017 16:57
-
-
Save bradbeattie/e085b655d109dff0b5ba5710ff3ced15 to your computer and use it in GitHub Desktop.
PyCon Preference Displayer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To be used on https://us.pycon.org/2017/schedule/talks/ | |
// after using https://gist.github.com/bradbeattie/8d346acda2d737ef23ccf9cc78fd80d7 | |
// Display the recorded preference for each talk | |
// To be used in tandem with | |
$(".slot-talk .title a").each(function() { | |
var element = $(this) | |
var href = element.attr("href") | |
if (localStorage[href] !== undefined) { | |
element.parents(".slot-talk").css("background", "hsl(" + ((parseInt(localStorage[href]) + 5) * 10) + ", 50%, 50%)") | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment