Skip to content

Commit

Permalink
Refactored code to use arrow function in sidebar.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
Royal-lobster committed Jan 7, 2024
1 parent f1b7dbb commit e81971d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file modified artifacts/chrome.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion src/pages/content/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ document.body.appendChild(iframe)
* To open the sidebar, the background script sends a message with the action 'open-sidebar'.
* The sidebar is opened by setting the width of the iframe to 400px.
*/
chrome.runtime.onMessage.addListener(function (msg) {
chrome.runtime.onMessage.addListener((msg) => {
if (msg.action === 'open-sidebar') {
if (iframe.style.width === '0px') {
iframe.style.width = '400px'
Expand Down

0 comments on commit e81971d

Please sign in to comment.