Skip to content

Instantly share code, notes, and snippets.

@jerone
Created March 3, 2014 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jerone/9335196 to your computer and use it in GitHub Desktop.
Save jerone/9335196 to your computer and use it in GitHub Desktop.
OpenUserJS.org Export Cert
// ==UserScript==
// @name OpenUserJS.org Export Cert
// @namespace http://OpenUserJS.org
// @homepageUrl http://OpenUserJS.org
// @include http://userscripts.org/home/scripts
// @version 1
// @grant GM_openInTab
// ==/UserScript==
(function () {
var userId = document.evaluate('//li[@class="menu"]/a[text()[contains(.,"public profile")]]', document, null, 9, null) .singleNodeValue.href.match(/(\d+)/) [0];
if (window.confirm('Open tab to OpenUserJS.org?')) {
GM_openInTab('http://openuserjs.org?cert=' + window.btoa(unescape(encodeURIComponent(userId))));
}
}) ();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment