1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-28 01:10:51 +01:00

Fix save-user_flag.js

This commit is contained in:
Jano Slota 2014-07-05 23:17:08 +02:00 committed by czaks
parent 23fc32f835
commit d1a3fe6dbf

View File

@ -1,6 +1,5 @@
onready(function(){ onready(function(){
var uri = window.location.pathname.substr(1); var flagStorage = "flag_"+window.location.pathname.split('/')[1];
var flagStorage = uri.slice(0, -1)+'_flag';
var item = window.localStorage.getItem(flagStorage); var item = window.localStorage.getItem(flagStorage);
$('select[name=user_flag]').val(item); $('select[name=user_flag]').val(item);
$('select[name=user_flag]').change(function() { $('select[name=user_flag]').change(function() {