josteink / gmailjs-node-boilerplate

A minimal extension which demonstrates how to create a extension with Gmail.JS and NodeJS-based bundling.
71 stars 34 forks source link

This document requires 'TrustedHTML' assignment #38

Open kstubs opened 3 months ago

kstubs commented 3 months ago

I'm following the ReadMe installation instructions for installing the boilerplate. I've ran the npm install and build steps and have loaded the extension into chrome. I've attached my console log. mail.google.com-1721145048368.log

In this log, I see errors related to TrustedHTML and see errors related to jQuery is not defined. There are more errors, but these might be a cascading result stemming from the above. I'm not sure.

Is the boilerplate outfitted with the jQuery updates that fix this TrustedHTML issue?

Karl..

josteink commented 3 months ago

Good catch! That TrustedHTML patch was never added to the boilerplate repo.

It would probably be very useful and instructive if added!

Do you think you could be able to create a PR for that?

I'm kinda busy with family vacation atm and while I can quickly approve a PR, implementing it myself might take a bit more time 😇

kstubs commented 3 months ago

I will try. This level of JS, Build, Distribution, etc.. is new to me. If I have sometime tonight I will look. Enjoy your vacay!

On Tue, Jul 16, 2024 at 12:06 PM Jostein Kjønigsen @.***> wrote:

Good catch! That TrustedHTML patch was never added to the boilerplate repo.

It would probably be very useful and instructive if added!

Do you think you could be able to create a PR for that?

I'm kinda busy with family vacation atm and while I can quickly approve a PR, implementing it myself might take a bit more time 😇

— Reply to this email directly, view it on GitHub https://github.com/josteink/gmailjs-node-boilerplate/issues/38#issuecomment-2231640866, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVPODJ3WGSXI7T5GAHNC4LZMVVMDAVCNFSM6AAAAABK64PQGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZRGY2DAOBWGY . You are receiving this because you authored the thread.Message ID: @.***>

kstubs commented 2 months ago

Can you point me to the particular pull request from the gmailjs repo where the TrustedHTML updates were implemented? This would help get me started in updating the boilerplate to remedy the issues with it.

kstubs commented 2 months ago

It looks like the boilerplate is attempting to solved the trusted html policy issue, but I guess not working correctly?

https://github.com/josteink/gmailjs-node-boilerplate/blob/fbb9b306b5debca47270d091f29743f56cc011c3/src/gmailJsLoader.js#L16

kstubs commented 2 months ago

I see where you fixed the boiler plate: https://github.com/KartikTalwar/gmail.js/issues/779#issuecomment-1999818556 I'm playing catch-up here! So I'm not sure what we are trying to fix, since you fixed and tested it and it was working ;/

UPDATE! The boilerplate is working for me now.

josteink commented 2 months ago

Oh my bad then.

Well, the good news is you got things working, I guess?

kstubs commented 2 months ago

Yes/No. Boilerplate working, yes! Now working on my custom implementation. Unfortunately over the past few years I've lost my original Gmail code that helped me manage and reply to emails in my Inbox. As I'm replying to you, I'm thinking through some of the features I had (this is a thought exercise):

  1. From a popup - Implemented Reply button click
  2. Inject custom template into compose window
  3. Update Subject of email
  4. By changing the subject and including myself in the reply, this custom subject can then trigger a filter which can then run any of the filter routines that you have defined. For instance, applying a Label to the email.
    1. Applying a label to the email was a challenge I had posed to the Gmail group in the past. I don't believe we ever figured that out.
  5. I was also looking up customer details by calling my Api in the background script by Ajax calls

FYI - was in Oslo this past May. I should have looked you up!

Karl Stubsjoen (602) 845-0006

On Tue, Aug 13, 2024 at 11:33 PM Jostein Kjønigsen @.***> wrote:

Oh my bad then.

Well, the good news is you got things working, I guess?

— Reply to this email directly, view it on GitHub https://github.com/josteink/gmailjs-node-boilerplate/issues/38#issuecomment-2287959594, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVPODKI6TO5WHQ34ZJJOMDZRL22PAVCNFSM6AAAAABK64PQGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBXHE2TSNJZGQ . You are receiving this because you authored the thread.Message ID: @.***>

josteink commented 2 months ago

If your extension was published anywhere, it should be easy to just redownload the ZIP/XPI and extract the old code, right? ;)

kstubs commented 2 months ago

It might be on a thumb drive somewhere. It has been awhile since I've tried to resurrect it. I'm still looking for it!

Karl Stubsjoen (602) 845-0006

On Wed, Aug 14, 2024 at 11:12 AM Jostein Kjønigsen @.***> wrote:

If your extension was published anywhere, it should be easy to just redownload the ZIP/XPI and extract the old code, right? ;)

— Reply to this email directly, view it on GitHub https://github.com/josteink/gmailjs-node-boilerplate/issues/38#issuecomment-2289510588, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVPODPB43AHSLYHIRWV35LZROM2PAVCNFSM6AAAAABK64PQGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBZGUYTANJYHA . You are receiving this because you authored the thread.Message ID: @.***>