JSFiddle - React, Tailwind, and code Playground
by Shree Khanal
JavaScript
exports.flagCategories = [{
BoxStyle: {
'padding-left': '5px',
'padding-right': '5px',
'background-color': 'rgba(241, 148, 148, 0.6)'
},
AppliesTo: ['Answer', 'Question'],
FlagTypes: [{
Id: 1,
DisplayName: 'Spam',
ReportType: 'PostSpam'
},
{
Id: 2,
DisplayName: 'Rude or Abusive',
ReportType: 'PostOffensive'
}
]
},
{
BoxStyle: {
'padding-left': '5px',
'padding-right': '5px',
'background-color': 'rgba(241, 148, 148, 0.6)'
},
AppliesTo: ['Answer'],
FlagTypes: [{
Id: 3,
DisplayName: 'Plagiarism',
ReportType: 'PostOther',
Enabled: function(hasDuplicatePostLinks) {
return hasDuplicatePostLinks;
},
GetCustomFlagText: function(copyPastorItem) {
return "Possible plagiarism of another answer https:" + copyPastorItem.target_url + ", as can be seen here http://copypastor.sobotics.org/posts/" + copyPastorItem.post_id;
}
},
{
Id: 4,
DisplayName: 'Duplicate answer',
ReportType: 'PostOther',
Enabled: function(hasDuplicatePostLinks) {
return hasDuplicatePostLinks;
},
GetComment: function(userDetails) {
return userDetails.AuthorName + ', please don\'t add the [same answer to multiple questions](http://meta.stackexchange.com/questions/104227/is-it-acceptable-to-add-a-duplicate-answer-to-several-questions). Answer the best one and flag the rest as duplicates, once you earn enough reputation. If it is not a duplicate, [edit] the answer and tailor the post to the question.';
},
GetCustomFlagText: function(copyPastorItem) {
return "The answer is a repost of their other answer https:" + copyPastorItem.target_url + ", but as...