This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Extension { | |
constructor(api, component, element) { | |
this.$api = api; | |
this.$component = component; | |
this.$el = element; | |
this.id = api.store.currentConversation().id; | |
this.keyboardListener = api.dom.onTextareaKeyboardEvent(this.onKeyboardEvent.bind(this)); | |
api.common.onCurrentConversationChanged(event => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fpsMeter() { | |
let prevTime = Date.now(), | |
frames = 0; | |
requestAnimationFrame(function loop() { | |
const time = Date.now(); | |
frames++; | |
if (time > prevTime + 1000) { | |
let fps = Math.round( ( frames * 1000 ) / ( time - prevTime ) ); | |
prevTime = time; |