Moved tag logic for Javascript to config file

This commit is contained in:
BrokenEagle
2017-11-06 14:43:06 -08:00
parent 1e5540f3a0
commit 1de8fd2bd6
7 changed files with 38 additions and 21 deletions

View File

@@ -224,7 +224,8 @@ module Danbooru
"short" => "gen",
"extra" => [],
"header" => "<h1>Tags</h1>",
"humanized" => nil
"humanized" => nil,
"relatedtag" => "General"
},
"character" => {
"category" => 4,
@@ -236,7 +237,8 @@ module Danbooru
"exclusion" => [],
"regexmap" => /^(.+?)(?:_\(.+\))?$/,
"formatstr" => "%s"
}
},
"relatedtag" => "Characters"
},
"copyright" => {
"category" => 3,
@@ -248,7 +250,8 @@ module Danbooru
"exclusion" => [],
"regexmap" => //,
"formatstr" => "(%s)"
}
},
"relatedtag" => "Copyrights"
},
"artist" => {
"category" => 1,
@@ -260,7 +263,8 @@ module Danbooru
"exclusion" => %w(banned_artist),
"regexmap" => //,
"formatstr" => "drawn by %s"
}
},
"relatedtag" => "Artists"
}
}
end
@@ -308,6 +312,11 @@ module Danbooru
@categorized_tag_list ||= ["copyright","character","artist","general"]
end
#Sets the order of the related tag buttons (javascripts/related_tag.js)
def related_tag_button_list
@related_tag_button_list ||= ["general","artist","character","copyright"]
end
#END TAG
# If enabled, users must verify their email addresses.