Skip to content

Instantly share code, notes, and snippets.

@lucifr
lucifr / gist:3696466
Created September 11, 2012 06:25 — forked from al3xandru/gist:1169583
Things Generalized Bookmarklet
javascript: (function () {
var w = window,
d = document,
selectedTxt = w.getSelection ? w.getSelection() : (d.getSelection) ? d.getSelection() : (d.selection ? d.selection.createRange().text : 0),
pageUri = w.location.href,
isGMail = w.location.host.match(/mail\.google\.com/),
subject = d.title,
source, url;
if (isGMail) {
var msgFrm = d.getElementById('canvas_frame'),