Skip to content

Commit 8222829

Browse files
committed
Remove unnecessary listen
1 parent a582a53 commit 8222829

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

src/main.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -265,24 +265,12 @@ function addToolbarButton(toolbar) {
265265
resetGiphyModals();
266266
}
267267

268-
/**
269-
* Defines the event listeners
270-
*/
271-
function listen() {
272-
delegate('.ghg-gif-selection', 'click', selectGif);
273-
}
274-
275-
// Ensure we only bind events to elements once
276-
const listenOnce = onetime(listen);
277-
278268
/**
279269
* Initialize the extension by adding buttons to existing toolbars
280270
* and watching for new ones.
281271
*/
282272
function init() {
283273
debugLog('Initializing GIFs for GitHub...');
284-
// Ensure we only bind events to elements once
285-
listenOnce();
286274

287275
// Add buttons to existing toolbars
288276
// Use a selector that matches both new and old GitHub styles

0 commit comments

Comments
 (0)