Sha256: e6009a040ad6d25f6196ee871f1f9f902e661588c7dfe68c5f35aabacd6b9638

Contents?: true

Size: 967 Bytes

Versions: 8

Compression:

Stored size: 967 Bytes

Contents

$(document).ready ->
  unless localStorage.getItem("content") == null
    $("#color-settings-body-color").attr("href", localStorage.getItem("content"))

  if (localStorage.getItem("contrast") isnt null) and not $("body").hasClass("contrast-background")
    $("body")[0].className = $("body")[0].className.replace(/(^|\s)contrast.*?(\s|$)/g, " ").replace(/\s\s+/g, " ").replace(/(^\s|\s$)/g, "")
    $("body").addClass localStorage.getItem("contrast")

  $(".color-settings-body-color > a").hover ->
    $("#color-settings-body-color").attr("href", $(this).data("change-to"))
    localStorage.setItem("content", $(this).data("change-to"))

  $(".color-settings-contrast-color > a").hover ->
    $('body')[0].className = $('body')[0].className
      .replace(/(^|\s)contrast.*?(\s|$)/g, ' ')
      .replace(/\s\s+/g, ' ')
      .replace(/(^\s|\s$)/g, '');
    $('body').addClass($(this).data("change-to"))
    localStorage.setItem("contrast", $(this).data("change-to"))

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cg_app_base-1.1.1 app/assets/javascripts/flatty/demo.js.coffee
cg_app_base-1.0.78 app/assets/javascripts/flatty/demo.js.coffee
cg_app_base-1.0.62 app/assets/javascripts/flatty/demo.js.coffee
cg_app_base-1.0.56 app/assets/javascripts/flatty/demo.js.coffee
cg_app_base-1.0.55 app/assets/javascripts/flatty/demo.js.coffee
cg_app_base-1.0.54 app/assets/javascripts/flatty/demo.js.coffee
cg_app_base-1.0.52 app/assets/javascripts/flatty/demo.js.coffee
cg_app_base-1.0.51 app/assets/javascripts/flatty/demo.js.coffee