From dad6e290f8d102ed24ea563c2cfafbb126dab041 Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Sun, 20 Mar 2016 11:53:23 -0700 Subject: [PATCH] Improve bookmarklets to include author name Summary:Including author's name makes the replies more personalized. Closes https://github.com/facebook/react-native/pull/6545 Differential Revision: D3074715 Pulled By: mkonicek fb-gh-sync-id: ac21ddc2c2864585c3a16ad0be7619ba432831b3 shipit-source-id: ac21ddc2c2864585c3a16ad0be7619ba432831b3 --- bots/pr-inactivity-bookmarklet.js | 1 + bots/question-bookmarklet.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 bots/pr-inactivity-bookmarklet.js diff --git a/bots/pr-inactivity-bookmarklet.js b/bots/pr-inactivity-bookmarklet.js new file mode 100644 index 00000000000000..f0c363922c36d5 --- /dev/null +++ b/bots/pr-inactivity-bookmarklet.js @@ -0,0 +1 @@ +javascript:(function(){$('#new_comment_field')[0].value='Hey @' + $(".timeline-comment-header-text").first().find(".author").text() + '! Thanks for making the pull request, but we are closing it due to inactivity (' + Math.round(Math.abs((Date.now() - new Date($(".timeline-comment-header-text").last().find("time").attr("datetime")).getTime())/(24*60*60*1000))) + ' days with no activity). If you want to get your proposed changes merged, please rebase your branch with master and send a new pull request. :)';/*$('button.btn-primary:contains("Comment")').click()*/})() diff --git a/bots/question-bookmarklet.js b/bots/question-bookmarklet.js index 9fa4885de85c6e..83807194b92f18 100644 --- a/bots/question-bookmarklet.js +++ b/bots/question-bookmarklet.js @@ -1 +1 @@ -javascript:(function(){$('#new_comment_field')[0].value='Hey and thanks for reporting this!\n\nThere\'s an awesome place to ask question like this one: [StackOverflow](http://stackoverflow.com/questions/tagged/react-native). It\'s the best system for Q&A. Many people from the community hang out there and will be able to see your question, you can vote on answers and mark question as answered etc. This lets us keep a list of bug reports and feature requests on github and especially [Product Pains](https://productpains.com/product/react-native/?tab=top) (again, with voting which is really nice).\n\nIf you think StackOverflow works for you please consider posting there instead and closing this issue.\n\nI\'m posting this here because github issues haven\'t been working very well for us and because StackOverflow is so much better. Thanks for reading! :)';$('button.btn-primary:contains("Comment")').click()})() +javascript:(function(){$('#new_comment_field')[0].value='Hey @' + $(".timeline-comment-header-text").first().find(".author").text() + '! Thanks for reporting this!\n\nThere\'s an awesome place to ask question like this one: [StackOverflow](http://stackoverflow.com/questions/tagged/react-native). It\'s the best system for Q&A. Many people from the community hang out there and will be able to see your question, you can vote on answers and mark question as answered etc. This lets us keep a list of bug reports and feature requests on github and especially [Product Pains](https://productpains.com/product/react-native/?tab=top) (again, with voting which is really nice).\n\nIf you think StackOverflow works for you please consider posting there instead and closing this issue.\n\nI\'m posting this here because github issues haven\'t been working very well for us and because StackOverflow is so much better. Thanks for reading! :)';$('button.btn-primary:contains("Comment")').click()})()