Fix save-user_flag.js
Conflicts: js/save-user_flag.js
This commit is contained in:
parent
9a98d518a0
commit
4fa98d938a
@ -1,8 +1,14 @@
|
|||||||
onready(function(){
|
function user_flag() {
|
||||||
var flagStorage = "flag_"+window.location.pathname.split('/')[1];
|
var flagStorage = "flag_" + document.getElementsByName('board')[0].value;
|
||||||
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() {
|
||||||
window.localStorage.setItem(flagStorage, $(this).val());
|
window.localStorage.setItem(flagStorage, $(this).val());
|
||||||
});
|
});
|
||||||
});
|
$(window).on('quick-reply', function() {
|
||||||
|
$('form#quick-reply select[name="user_flag"]').val($('select[name="user_flag"]').val());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (active_page == 'thread' || active_page == 'index') {
|
||||||
|
$(document).ready(user_flag);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user