Skip to content

Instantly share code, notes, and snippets.

@karlbright
Created May 2, 2012 09:28
Show Gist options
  • Save karlbright/2575513 to your computer and use it in GitHub Desktop.
Save karlbright/2575513 to your computer and use it in GitHub Desktop.
$(function(){
REGEX = /^\/thefrontiergroup\//;
if(window.location.pathname.match(REGEX)){
var actions, tip, button, commentForm, comment;
discussion = $('#discussion_bucket');
actions = discussion.find('div.form-actions');
commentForm = discussion.find('div.comment-form');
tip = discussion.find('.tip');
button = $('<button>');
comment = commentForm.find('textarea');
button.addClass('classy');
button.attr('tabindex',4);
button.css('float','left');
button.text('Looks good to me!');
button.bind('click',function(event){
event.stopImmediatePropagation();
comment.val(':thumbsup:');
});
button.insertAfter(tip);
tip.hide();
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment