Skip to content

Commit

Permalink
Hotfix/livechat missing jquery when loading live chat (RocketChat#325)
Browse files Browse the repository at this point in the history
* RocketChat#324 - jquery not available in livechat
* RocketChat#324 - correcting whitespaces
  • Loading branch information
ruKurz authored Apr 24, 2018
1 parent 8d91a9d commit 3a77e19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/rocketchat-livechat/livechat.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ WebApp.connectHandlers.use('/livechat', Meteor.bindEnvironment((req, res, next)
* @TODO Knowing this is not the best solution, we should check alternatives here.
* E.g. check https://stackoverflow.com/questions/27227214/
*/
$(document).ready(function() {
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
$("body").addClass("mobile-view");
}
document.addEventListener('DOMContentLoaded', function() {
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
document.body.className += ' ' + 'mobile-view';
}
});
</script>
</body>
Expand Down

0 comments on commit 3a77e19

Please sign in to comment.