javascript - Getting the thread id in Gmail -


i'm looking way figure out how thread id particular email on gmail, before sent or @ point send button clicked.

currently, i'm working javascript in order scrape other items off email , store them in record works pretty except thread id.

the thread id can found after send email within url:

https://mail.google.com/mail/u/0/?shva=1#inbox/13ddda647539dcca 

in case, thread id (if i'm right - 13ddda647539dcca.

any appreciated.

you try:

var matched = window.location.hash.match(/[a-za-z0-9]+$/); if (matched) {     // found alphanumeric string @ end of hash } 

and can value matched[0].

window.location.hash should grab "#inbox/13ddda647539dcca" part. regex match against alphanumeric characters @ end of string. fact "inbox" separated thread id "/" important.

of course, of depends on reliability of gmail keeping url following same convention seems be.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -