Custom JS extension - getting started
Hi,
Can you give me any hint where to get started with developing own custom JS script?
I tried to search for any object into which I can hook in but no luck... is there such object available in the scope? Maybe even something like InboxSDK but I cannot find it? :)
I suffer because Inbox cannot handle the signatures for SMTP account and I wanted to automatically apply email template based on the email address.
Hi, when you add the userscript it gets added into the head of the gmail/inbox window - usually before page load is complete.
You should be able to access window, document and any global variables added in by Gmail and Inbox. If you want to debug what's going on, you can right click on your account icon and choose inspect. This will bring up the inspector for that individual mailbox, in the same way chrome brings up the inspector for a window.
If you want to add something like InboxSDK you could inject the script with a script tag...
var el = document.createElement('script')
el.src = 'https://myurl.com/inboxsdk.js'
document.head.appendChild(el)
Let me know if you need any more help!