fembooru/ext/index/script.js

21 lines
698 B
JavaScript
Raw Normal View History

2012-03-22 13:40:13 +00:00
$(function() {
var blocked_tags = ($.cookie("blocked-tags") || "").split(" ");
for(i in blocked_tags) {
var tag = blocked_tags[i];
if(tag) $(".thumb[data-tags~='"+tag+"']").hide();
}
2012-03-22 15:44:04 +00:00
// need to trigger a reflow in opera, because opera implements
2012-03-22 13:40:13 +00:00
// text-align: justify with element margins and doesn't recalculate
// these margins when part of the line disappears...
2012-03-22 15:44:04 +00:00
$('#image-list').hide();
$('#image-list').show();
2012-03-22 13:40:13 +00:00
});
2012-03-22 14:19:46 +00:00
function select_blocked_tags() {
var blocked_tags = prompt("Enter tags to ignore", $.cookie("blocked-tags") || "My_Little_Pony");
if(blocked_tags) {
2012-03-22 16:28:57 +00:00
$.cookie("blocked-tags", blocked_tags.toLowerCase(), {path: '/', expires: 365});
2012-03-22 14:19:46 +00:00
location.reload(true);
}
}