This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/ext/index/script.js
2012-03-22 16:28:57 +00:00

20 lines
698 B
JavaScript

$(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();
}
// need to trigger a reflow in opera, because opera implements
// text-align: justify with element margins and doesn't recalculate
// these margins when part of the line disappears...
$('#image-list').hide();
$('#image-list').show();
});
function select_blocked_tags() {
var blocked_tags = prompt("Enter tags to ignore", $.cookie("blocked-tags") || "My_Little_Pony");
if(blocked_tags) {
$.cookie("blocked-tags", blocked_tags.toLowerCase(), {path: '/', expires: 365});
location.reload(true);
}
}