gmailjs-node-boilerplate icon indicating copy to clipboard operation
gmailjs-node-boilerplate copied to clipboard

This document requires 'TrustedHTML' assignment

Open kstubs opened this issue 1 year ago • 16 comments

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..

kstubs avatar Jul 16 '24 15:07 kstubs

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 😇

josteink avatar Jul 16 '24 19:07 josteink

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 avatar Jul 16 '24 20:07 kstubs

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 avatar Aug 13 '24 15:08 kstubs

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 avatar Aug 13 '24 15:08 kstubs

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.

kstubs avatar Aug 13 '24 16:08 kstubs

Oh my bad then.

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

josteink avatar Aug 14 '24 06:08 josteink

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: @.***>

kstubs avatar Aug 14 '24 14:08 kstubs

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

josteink avatar Aug 14 '24 18:08 josteink

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: @.***>

kstubs avatar Aug 14 '24 22:08 kstubs

Hey Karl,

Do you have that custom extension, I want to integrate this with my screens and all.

krylor avatar Nov 21 '24 16:11 krylor

Hey Kmax,

Unfortunately, I haven't been able to locate that thumb drive.

Regarding the boilerplate issue and the TrustedHTML concern, I believe those were resolved. The problem I encountered seems to have been caused by a different extension, not the boilerplate itself.

Specifically, which custom extension, or which features were you interested in?

Best, Karl

Karl Stubsjoen (602) 845-0006

On Thu, Nov 21, 2024 at 9:44 AM Kmax @.***> wrote:

Hey Karl,

Do you have that custom extension, I want to integrate this with my screens and all.

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

kstubs avatar Nov 21 '24 17:11 kstubs

Oh, I was looking for a good example where I could inject my custom pop-up as a button. The idea is to integrate this with my own CRM and respond to events, I had built one based on the earlier boiler-plate example but that's now obsolete and has stopped working altogether.

krylor avatar Nov 22 '24 06:11 krylor

I had built one based on the earlier boiler-plate example but that's now obsolete and has stopped working altogether.

To be clear... the boilerplate works fine for me. When you say "stopped working", are you talking about the boiler-plate or the project you yourself built?

josteink avatar Nov 22 '24 08:11 josteink

The project that I built based on the older boiler plate broke because Gmail changed a bunch of stuff. I guess the old boilerplate is broken too. yours works fine though.

krylor avatar Nov 22 '24 08:11 krylor

Can I inject jquery, my legacy requires it. I need it for the other parts of my extension. When I try to do it, it gives me that "TrustedHTML" error.

krylor avatar Nov 23 '24 13:11 krylor

I'm including jquery, but bundling it.

Once loaded, it should be easy to inject into the global DOM if you need it.

josteink avatar Nov 23 '24 23:11 josteink