-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move VIEW_HISTORY_MEMORY constant to view_history.js
#6587
Move VIEW_HISTORY_MEMORY constant to view_history.js
#6587
Conversation
Currently this constant is present in `viewer.js`, but it is not used there at all. Instead, it is used in `view_history.js` where we have a global for it. We might as well move the constant to `view_history.js` as that is the only place where it is used, thereby removing a global and an unused constant from `viewer.js`.
It took a while, but I finally had a bit of time to create a new patch. @Snuffleupagus Could you review this one if you have time? |
If you're touching this code anyway, I'm wondering if we should take it a bit further by making the size configurable when initializing
@timvandermeij How do you feel about the above? |
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/946f6bfc082e149/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/946f6bfc082e149/output.txt Total script time: 0.75 mins Published |
@Snuffleupagus I have implemented that in the second commit. It seems like a good addition to me too. Note that I have kept the commits separate on purpose as the first one is just moving code and the second one is adding new functionality. For the sake of consistency I did not use Could you check this patch again? |
Move VIEW_HISTORY_MEMORY constant to `view_history.js`
Looks good, thanks for the clean-up! |
Currently this constant is present in
viewer.js
, but it is not used there at all. Instead, it is used inview_history.js
where we have a global for it. We might as well move the constant toview_history.js
as that is the only place where it is used, thereby removing a global and an unused constant fromviewer.js
.