File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 139139 toggleEmoteMenu ( ) ;
140140 hideTooltip ( ) ;
141141 }
142- } )
142+ } ) ;
143+
144+ $ ( document . getElementById ( 'tenor' ) ) . on ( 'click' , '.tenor-gif' , function ( e ) {
145+ qtObject . emoteClicked ( this . getAttribute ( 'share-url' ) ) ;
146+ registerShare ( this . getAttribute ( 'share-id' ) ) ;
147+ if ( ! e . shiftKey ) {
148+ toggleEmoteMenu ( ) ;
149+ hideTooltip ( ) ;
150+ }
151+ } ) ;
143152 } ;
144153
145154 function showTooltip ( elem ) {
Original file line number Diff line number Diff line change @@ -76,10 +76,6 @@ function searchAppendCallback(json) {
7676 img . setAttribute ( 'share-url' , element [ 'media' ] [ 0 ] [ 'gif' ] [ 'url' ] ) ;
7777 img . setAttribute ( 'share-id' , element [ 'id' ] ) ;
7878 img . src = element [ 'media' ] [ 0 ] [ 'nanogif' ] [ 'url' ] ;
79- img . onclick = function ( ) {
80- emoteClicked ( this . getAttribute ( 'share-url' ) , false ) ;
81- registerShare ( this . getAttribute ( 'share-id' ) ) ;
82- } ;
8379 elem . appendChild ( img ) ;
8480 } ) ;
8581}
You can’t perform that action at this time.
0 commit comments