Commit 61b17b4c authored by Zach Copley's avatar Zach Copley

Facebook app: don't add FBJS event listeners to notice input box if it's not on the page

parent e5b075b9
......@@ -19,10 +19,12 @@
var max = 140;
var noticeBox = document.getElementById('notice_data-text');
noticeBox.addEventListener('keyup', keypress);
noticeBox.addEventListener('keydown', keypress);
noticeBox.addEventListener('keypress', keypress);
noticeBox.addEventListener('change', keypress);
if (noticeBox) {
noticeBox.addEventListener('keyup', keypress);
noticeBox.addEventListener('keydown', keypress);
noticeBox.addEventListener('keypress', keypress);
noticeBox.addEventListener('change', keypress);
}
// Do our the countdown
function keypress(evt) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment