Skip to content

Commit

Permalink
Added support to choose more than one category
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsimoes committed Jan 14, 2019
1 parent d196a49 commit 8f92af0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions static/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

$(window).on('action:ajaxify.end', function(ev) {

// Category ID to be displayed the 'not safe for work' confirm box
var nsfwCategoryId = 28;

if (parseInt(ajaxify.data.cid, 10) === nsfwCategoryId) {
var nsfwCategoriesIds = [28];
// To add more than one NSFW category, just use comma and then type the ID
// eg.: var nsfwCategoriesIds = [28,29,30];

if( $.inArray( parseInt(ajaxify.data.cid, 10) , nsfwCategoriesIds) != -1){
// Blur category content when entering on the specified category above
$('#content').css({
filter: 'blur(10px)'
Expand Down

0 comments on commit 8f92af0

Please sign in to comment.