Last active
June 27, 2022 17:04
-
-
Save r-k-b/911eff689044d30561eab19bb30d09bd to your computer and use it in GitHub Desktop.
Get an email's RFC822 msgId Link from GMail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Extract an email's RFC822 msgId Link from GMail | |
// @namespace https://gist.github.com/r-k-b/ | |
// @version 1.0.0 | |
// @description Get an email's RFC822 msgId Link from GMail | |
// @author Robert K. Bell | |
// @homepage https://gist.github.com/r-k-b/911eff689044d30561eab19bb30d09bd | |
// @downloadURL https://gist.github.com/r-k-b/911eff689044d30561eab19bb30d09bd/raw/extract-rfc822-link-from-gmail.user.js | |
// @include *://*/* | |
// @grant none | |
// @run-at context-menu | |
// ==/UserScript== | |
/* jshint esnext: true */ | |
(() => { | |
window.location = "https://gmail.com/#search/rfc822msgid:" + | |
encodeURIComponent(window.document.body.innerHTML.match(/Message-ID: <(.*)>/)[1]) + | |
"/" + | |
encodeURIComponent(window.location.search.toString().slice(1).split('&').filter(function (x) { | |
return x.slice(0, 3) == "th=" | |
})[0].slice(3)); | |
}); |
This Greasemonkey script is the only way I've seen (so far) to get shareable links to emails.
On which page are we supposed to use this script? I cannot seem to get it working.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi i was looking for a way to get a url which everyone can use and access the same email, this a good way.
you know another efective way to do this, or a pluging.
Sorry for my english.