Skip to content

Instantly share code, notes, and snippets.

@darashi
Created August 29, 2008 11:04
Show Gist options
  • Save darashi/7952 to your computer and use it in GitHub Desktop.
Save darashi/7952 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name gist-ubiquitifier
// @namespace http://d.hatena.ne.jp/darashi
// @description adds link to Gist Ubiquitifier on gist
// @include http://gist.github.com/*
// @include https://gist.github.com/*
// @version 0.0.0
// ==/UserScript==
var target = document.getElementById("gist_meta");
var id = self.location.href.match(/^https?:\/\/gist.github.com\/([0-9]+)/);
if( target && id ) {
var element = document.createElement('div');
var ubiquityUrl = "http://ubiquity.s21g.com/"+id[1];
element.innerHTML = "<h3>install via <a href=\"http://ubiquity.s21g.com\">Gist Ubiquitifier</a></h3><a href=\""+ubiquityUrl+"\">install this via Gist Ubiquitifier</a>";
target.appendChild(element);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment