Facebook app: don't add FBJS event listeners to notice input box if it's not on the page
This commit is contained in:
parent
e5b075b912
commit
61b17b4c02
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user