Skip to content

Mapping rules for GPlusX

fauxfiction edited this page Aug 6, 2011 · 13 revisions

Here's how to create rules for the GPlus SDK: How to add mapping rules to GPlusX

Process

To enable collaboration, here's a proposal for the process

  1. Identify different pages
  2. Identify different parts of the page, factoring out which ones are in common with other pages
  3. Choose parts of the page to write rules for, focusing on the ones most important to your extension(s). Sign up your name in the wiki so others don't duplicate your work.
  4. You can write the rules directly into this wiki page (easiest), or you can clone https://github.com/huyz/gplusx

The library is not ready to use yet, so Huy will be testing your rules over time, or when the library is done.

Google+ Pages & their Parts (+ volunteers)

Common to all

  • gbar
    • Huy: I've done the outer parts of the gbar.
    • Remaining:
      • the parts of the "More" pull down menu
      • the popups for shares, notifications, many parts of the profile card.
  • gplusBar
    • Huy: That's mostly done.
  • #content and #contentPane
    • Matt - These are common to all pages and are the logical base selectors for finding columns and content. Need to be careful traversing from these though as the children/sibling divs are not constant across pages.

Stream, Circles

  • post
    • Huy: I've done all the static parts.
    • Remaining:
      • the content of the body because that varies per post
      • selector/classname for a post selected by the user (i.e. the dark-blue left edge). There's also a light-blue left edge, which I still don't know what is for.
      • DOM structures of parts that may be empty (comments, number of +1s, number & names of re-shares)
      • DOM structures of elements that appear later through JavaScript: the "aria" pop-up menu.

Single Post

Notifications

Sparks

  • Columns on stream page are siblings of #contentPane. Once columns are reliably identified (returning null on pages where they do not exist), finding Sparks, stream lists etc. is easy.

Circles

Photos

  • On the photo page, actual photo blocks are deeply nested. We could have a long traversal from #contentPane but it does not look like anything deeper is easily identifiable. Long traversal will be crippled if the photo display is changed at all.

Clone this wiki locally