1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-30 18:24:29 +01:00
vichan/js/save-user_flag.js
2014-07-06 01:31:22 +02:00

8 lines
297 B
JavaScript

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());
});
});