only refresh if needed
This commit is contained in:
parent
f993b3c19d
commit
ecad3b9891
@ -1,14 +1,20 @@
|
|||||||
$(function() {
|
$(function() {
|
||||||
var blocked_tags = ($.cookie("blocked-tags") || "").split(" ");
|
var blocked_tags = ($.cookie("blocked-tags") || "").split(" ");
|
||||||
|
var needs_refresh = false;
|
||||||
for(i in blocked_tags) {
|
for(i in blocked_tags) {
|
||||||
var tag = blocked_tags[i];
|
var tag = blocked_tags[i];
|
||||||
if(tag) $(".thumb[data-tags~='"+tag+"']").hide();
|
if(tag) {
|
||||||
|
$(".thumb[data-tags~='"+tag+"']").hide();
|
||||||
|
needs_refresh = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// need to trigger a reflow in opera, because opera implements
|
// need to trigger a reflow in opera, because opera implements
|
||||||
// text-align: justify with element margins and doesn't recalculate
|
// text-align: justify with element margins and doesn't recalculate
|
||||||
// these margins when part of the line disappears...
|
// these margins when part of the line disappears...
|
||||||
|
if(needs_refresh) {
|
||||||
$('#image-list').hide();
|
$('#image-list').hide();
|
||||||
$('#image-list').show();
|
$('#image-list').show();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function select_blocked_tags() {
|
function select_blocked_tags() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user