diff options
Diffstat (limited to 'js/save-user_flag.js')
| -rw-r--r-- | js/save-user_flag.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/js/save-user_flag.js b/js/save-user_flag.js new file mode 100644 index 00000000..120dfa08 --- /dev/null +++ b/js/save-user_flag.js @@ -0,0 +1,8 @@ +onready(function(){ + var flagStorage = "flag_"+window.location.pathname.split('/')[1]; + var item = window.localStorage.getItem(flagStorage); + $('select[name=user_flag]').val(item); + $('select[name=user_flag]').change(function() { + window.localStorage.setItem(flagStorage, $(this).val()); + }); +});
\ No newline at end of file |
