Skip to content

Instantly share code, notes, and snippets.

@marutanm
Created November 29, 2010 11:57
Show Gist options
  • Save marutanm/719876 to your computer and use it in GitHub Desktop.
Save marutanm/719876 to your computer and use it in GitHub Desktop.
ちくわぶからはてな記法を生成してくれるgreasemonkeyスクリプト
// ==UserScript==
// @name add d.hatena
// @namespace in.shisobu.marutanm
// @description add link to current image in hatena style
// @include http://tiqav.com/*
// ==/UserScript==
( function(){
var tr = document.createElement('tr');
var th = document.createElement('th');
th.innerHTML = "d.hatena : ";
var td = document.createElement('td');
td.innerHTML = '<input type="text" value=[' + document.getElementById('input_paste_image').value + ':image] onfocus="tiqav.select" readonly="true">';
tr.appendChild(th);
tr.appendChild(td);
document.getElementById('input_paste_container').lastChild.appendChild(tr);
}) ();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment