ukhas / js-logtail

Remote log tailing using the HTTP Range header.
109 stars 54 forks source link

log-tail script still running if log shown in modal window and the window is closed #13

Open ReddySk opened 7 years ago

ReddySk commented 7 years ago

Hello,

I am opening the log-tail page in modal window using bootstrap.

Problem is that even if the modal window is closed and even if I used to remove data from closed modal by following script which works for all my modal windows opened by link the script to seems stay active and still invoking ajax to the log file:

    <script type="text/javascript">
        $('.modal').on('hidden.bs.modal', function () {
              $(this).removeData('bs.modal');
        }); 
    </script>

Please advise solution.

Thanks, Reddy

danielrichman commented 7 years ago

Well, logtail.js kind of assumes it owns the page in more ways than just that: it tries to scroll the whole page, it adds a global window.onerror handler, etc. So the way I see it, you have two options: