1. Cross-browser selection UI injection flow:

    1. Listen for mouseup on body
    2. When triggered, let s be window.getSelection()
    3. If s.isCollapsed === false, return
    4. Else, let r be s.getRangeAt(0)
    5. Create a new element e
    6. Call r.surroundContents(e)
    7. e.innerHTML and e.textContent now return useful values, and e’s coordinates can be used to inject UI into the page

    To resolve: what element should e be? Or more accurately, what display property should it have? Possibly inline-block (inline mucks up if selection is across block elements, block mucks up selections within text nodes)

    Turns out there are problems with r.surroundContent, namely that it does not handle partial element selections. See MDNs explanation and solution.
  2. Jovian Salak: Microphone's arrived. Now all set for #Nepal. Just need to encourage some creative juices in advance. Not sure how this is done though...

    Jovian Salak alternate solution: we throw a DIY pizza party with recitals of Half Caste, as a joint leaving party

  3. Jovian Salak: Microphone's arrived. Now all set for #Nepal. Just need to encourage some creative juices in advance. Not sure how this is done though...

    Jovian Salak I know the solution: a farm nearby is selling a small hay bale (£3.50). Let’s buy it and roll it to the .

  4. Trawling through Dubliners CDs to try to find one particular song I remember hearing early in my childhood. I really love this , it is so grounded.

  5. This morning’s update: ditched the crappy old DRY-violating tags module and replaced it with a super lightweight one. Soon I’ll add the ability to store tag descriptions, synonyms/related tags as well as dynamically pull content in from the URLs it lists so the tag pages aren’t quite as boring.

  6. Evan Prodromou: If you were thinking about Kickstarting an Open Source RSS reader, well, today's the day.

    evanp funny, I’ve been thinking of doing that for a while. Not sure I’ve got what it takes though, and I’m booked up for the next 4 months :/

  7. Jovian Salak: Yippee a new #pope. Why is everyone so excited? The new pope will still have to defend the *integrity* of a ridiculous religious corporation


  8. Josh Emerson: @BarnabyWalters One-day-olderness day surely. It’s not like you become a year older in a day.

    Josh Emerson well that’s the point — the way we calculate age is so arbitrary I thought I'd poke fun at it. “One day olderness day” is even better, but not so feasible for putting on cards :)

  9. In order to express how arbitrary birthdays (and all their western connotations) are to me, I will from now on refer to them as “one-olderness days”.

  10. I’m noticing a pattern emerge whilst writing the simplified auth code: multiple event listeners which don’t know about each other working on the same object, augmenting and changing it.

    E.G. RememberMeListener looks for an encrypted cookie with a URL (my user ID of choice) in — if it finds one it makes an ActivityStream person object and puts it in request.attributes.user.

    Then, in the same event chain but at a lower priority level, the Contacts module looks in request.attributes.user for a URL. It looks up the URL in my people DB and, if there is anyone, augments request.attributes.user with all the extra info (full name, roles, photo URL, rel value, etc.)

    Then, another listener could run, looking for request.attributes.user with only URL — and look the URL up on identengine.com, caching the response.

    Other example is @-name autolinking, working on a similar basis of: basic transformation (raw data => common data format), then progressive augmentation adding URLs, names and rel values.

    I think this a very powerful and flexible pattern and something I will make a founding principle of Taproot.