[HELP!] JavaScript for new plugin [HELP!]

Hello! (I NEED HELP!) I joined Bubble.io as a no-coder with little knowledge of Javascript and other programming languages. But I am making a Plugin anyways. I need help adding code. (BTW, I am integrating Bubble with a chat widget called Customerly. Also, I am using an HTML to Javascript converter.) Screenshots and more information below.

The steps I took:

I copied the code [1] and put it here [2] and it worked fine. [3]



But when I tried to make actions using their “tips” [4] (Show, hide, etc.), separated the code [5], turning it into Javascript [6], pasting it into an action [7], and trying it out in my testing app (editor here) [8], it didn’t work [9] (and showed a notification saying I was trying to remove the banner. I wasn’t!).



Could I have some help? (Please make it fast) Thanks in advance.