Skip to content

Instantly share code, notes, and snippets.

@bradbeattie
Last active April 20, 2017 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradbeattie/e085b655d109dff0b5ba5710ff3ced15 to your computer and use it in GitHub Desktop.
Save bradbeattie/e085b655d109dff0b5ba5710ff3ced15 to your computer and use it in GitHub Desktop.
PyCon Preference Displayer
// 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