Skip to content

Instantly share code, notes, and snippets.

@skipjac
Last active September 29, 2015 10:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skipjac/1585366 to your computer and use it in GitHub Desktop.
Save skipjac/1585366 to your computer and use it in GitHub Desktop.
Sets the comment mode to private based on a tag set in the agents profile
(function() {
var commentDefault = $j.inArray("private", currentUser.tags)
if(commentDefault !== -1){
$j('#comment_type.say').attr('class', 'say private');
$j('input#comment_is_public').attr('checked', false);
}
}());
</script>
@rshoham
Copy link

rshoham commented Jul 3, 2013

Hmm. This did not seem to work.

(1) Had applied the new widget code in place of the previous one. Clicked "Update Widget".

(2) Confirmed the agent in question has tag = "private" (all lower case)

(3) Verified that the "Requested and CCs can see this comment (public comment)." check box is checked.

the idea is for it to be un-checked.

(I can attach screen-shots for you to see each of the 3 steps above...or trust me)
How do I attach screen-shots on here anyways....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment