X-Git-Url: http://git.ieval.ro/?p=gruntmaster-page.git;a=blobdiff_plain;f=js%2F90-custom.js;fp=js%2F90-custom.js;h=0000000000000000000000000000000000000000;hp=183f3dd3c282aff96679e85b6f942df027ecfb80;hb=bcf95b418334059308214ea1c1546536c2ebf545;hpb=4b4a81371ead43b2f9e01a924625eda1e5275199 diff --git a/js/90-custom.js b/js/90-custom.js deleted file mode 100644 index 183f3dd..0000000 --- a/js/90-custom.js +++ /dev/null @@ -1,36 +0,0 @@ -(function(){ - 'use strict'; - function set_style(name){ - $('#stylesheet').attr("href", "/css/" + name + ".css"); - localStorage.setItem("theme", name); - } - - $( document ).ready(function() { - $('#theme-selector').removeClass('hidden'); - - var hiddenDiv = $(document.createElement('div')); - - hiddenDiv.addClass('hiddendiv common'); - - $('body').append(hiddenDiv); - - $("textarea.autoresize").on('keyup', function () { - var content = $(this).val(); - - content = content.replace(/\n/g, '
'); - hiddenDiv.html(content + '
'); - - $(this).css('height', hiddenDiv.height()+23); - }); - - $('#theme_slate' ).on('click', function () { set_style("slate"); }); - $('#theme_cerulean').on('click', function () { set_style("cerulean"); }); - $('#theme_cyborg' ).on('click', function () { set_style("cyborg"); }); - $('#theme_cosmo' ).on('click', function () { set_style("cosmo"); }); - }); - - var theme = localStorage.getItem("theme"); - if(theme) { - set_style(theme); - } -})();