1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-12-02 19:17:21 +01:00
vichan/js/save-user_flag.js

8 lines
297 B
JavaScript
Raw Normal View History

2014-07-05 03:11:15 +02:00
onready(function(){
2014-07-05 23:17:08 +02:00
var flagStorage = "flag_"+window.location.pathname.split('/')[1];
2014-07-05 03:11:15 +02:00
var item = window.localStorage.getItem(flagStorage);
$('select[name=user_flag]').val(item);
$('select[name=user_flag]').change(function() {
window.localStorage.setItem(flagStorage, $(this).val());
});
});