Git Product home page Git Product logo

gmail-link's Introduction

This is a scratch project to attempt to extract a reliable HTML href link to Google Mail messages.

Motivation

The Todoist application previously created a text entity capable of opening an individual Google Mail message, for the purposes of including that message in the text body of a task. This Google Mail reference was further capable of linking to any Google Mail domain account (e.g.: [email protected]) when another Google Mail domain (e.g.: [email protected]) was used as an authenticating service for Todoist.

This behavior was highly useful and desirable, as it allowed for linking a task to a Google Mail conversation thread for later processing or clairification of the task. This could be accomplished by authenticating Todoist to the domain of a source email to be linked (e.g.: [email protected]), using the Todoist Chrome plugin to generate the text entity, and copying this enitity to any Todoist account (e.g.: [email protected]).

The added step of authenticating to the Todoist account domain for the source email address was undesirable, but not an undue burden.

This behavior has changed in Todoist. Todoist now creates a non-text DOM entity, which may not be copied through standard means. This seems to effectively disable the process for attaching an email in a Google Mail domain which differs from the Google Mail domain used to authenticate the Todoist Chrome plugin.

Link Formatting

This is a sample same-domain email link generated by Todoist:

https://mail.google.com/mail/u/0/#inbox/140d656b8e54d660

  • works for Todoist authenticated in the same Google domain
  • returns "The conversation that you requested no longer exists" for a browser session authenticated in another domain

This is a sample of an email link generated by Todoist from a different authentication domain:

https://mail.google.com/a/umn.edu/#inbox/13f62a30179692eb

Todoist task list item formatting

This is the inner most HTML hyperlink from a functioning cross-domain Todoist task:

<a onclick="return linkRedirecter(this)" target="_blank" class="ex_link" href="https://mail.google.com/a/umn.edu/#inbox/13f62a30179692eb">Web Migrations for this weekend</a>

The link includes the Google domain, and fucntions in both domain-authenticated environments.

This is the complete HTML list item from a fucntioning cross-domain Todoist task:

<li class="task_item history_item item_110881999 indent_1" id="item_110881999">
  <table>
    <tbody>
      <tr>
        <td>
          <div class="div_checker">
            <div class="amicheckbox"><img width="16" height="16" src="https://d3ptyyxy2at9ui.cloudfront.net/76084e29cb2cf72b320e888edc583dfb.gif" class="cmp_14_checkbox_on amicheckbox_img"></div>
          </div>
        </td>
        <td class="content">
          <span class="date empty"></span><span>send Douglas a summary of your <img width="16" class="cmp_email_on" src="https://d3ptyyxy2at9ui.cloudfront.net/76084e29cb2cf72b320e888edc583dfb.gif"> <a onclick="return linkRedirecter(this)" target="_blank" class="ex_link" href="https://mail.google.com/a/umn.edu/#inbox/13f62a30179692eb">Web Migrations for this weekend</a><span class="clickable note_icon" style="visibility: hidden;"><img width="15" height="14" src="https://d3ptyyxy2at9ui.cloudfront.net/76084e29cb2cf72b320e888edc583dfb.gif" class="cmp_note clickable"></span></span>
          <div></div>
        </td>
      </tr>
    </tbody>
  </table>
</li>

Link formatting

This is the extracted URL from a functioning link:

https://mail.google.com/a/umn.edu/#inbox/13f62a30179692eb

This is the RESTful-style URL from the location line of a Google Mail thread:

https://mail.google.com/mail/ca/u/0/#inbox/141b796e773c4f19

Note that this URL loses the encoded domain information and includes extraneous path elements. It will not function cross-domain.

The following constructed URL tests as functioning:

https://mail.google.com/a/umn.edu/#inbox/141b796e773c4f19

note: The

/a/
path element is somehow relevant. Removing or replacing this portion of the path element does casues the URL to return an error.

TODO

Extract the relevant JavaScript which senses Google Mail item.

  • suspicion: URL analysis of the HTTP requested

gmail-link's People

Contributors

dispader avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.