diff --git a/ext/handle_pixel/script.js b/ext/handle_pixel/script.js index 16faa878..e127e42f 100644 --- a/ext/handle_pixel/script.js +++ b/ext/handle_pixel/script.js @@ -1,5 +1,7 @@ $(function() { - function zoom(zoom_type) { + function zoom(zoom_type, save_cookie) { + save_cookie = save_cookie === undefined ? true : save_cookie; + var img = $('.shm-main-image'); if(zoom_type == "full") { @@ -21,7 +23,9 @@ $(function() { $(".shm-zoomer").val(zoom_type); - Cookies.set("ui-image-zoom", zoom_type, {expires: 365}); + if (save_cookie) { + Cookies.set("ui-image-zoom", zoom_type, {expires: 365}); + } } $(".shm-zoomer").change(function(e) { @@ -29,7 +33,7 @@ $(function() { }); $(window).resize(function(e) { $(".shm-zoomer").each(function (e) { - zoom(this.options[this.selectedIndex].value) + zoom(this.options[this.selectedIndex].value, false) }); });