Skip to content

Instantly share code, notes, and snippets.

@mofigan
mofigan / bookmarklet_megalodon.js
Created August 1, 2010 06:48
ウェブ魚拓を見る/取得するブックマークレット
javascript:
(function(){
var l=location.href;
l=prompt('URL',l);
var u='http://megalodon.jp/?url='+escape(l);
with(window.open().document){
location.href=u;
close();
}
}
@mofigan
mofigan / bookmarklet_makehtml.js
Created July 30, 2010 19:01
HTMLアンカーを作るブックマークレット / Markdownアンカーを作るブックマークレット
javascript:(function(){
function tim(){
ele.parentNode.removeChild(ele);
}
var ele=document.createElement('textarea');
ele.style.width='100%';
ele.value='<a href='+location.href+'>'+document.title+'</a>';
document.body.insertBefore(ele,document.body.firstChild);
ele.focus();
ele.select();
@mofigan
mofigan / bookmarklet_unofficial_retweet_for_twitter.js
Created July 29, 2010 16:11
Twitterのパーマリンクから非公式RTするブックマークレット
javascript:
(function(){
if(location.href.match(/twitter\.com\/(.+?)\//)){
var id=RegExp.$1;
var s=document.getElementsByTagName('span');
for(var i=0;i<s.length;i++){
if(s[i].getAttribute('class')=='entry-content'){
var u='http://twitter.com/home?status=';
u+=encodeURIComponent('RT @'+id+': '+(s[i].innerText||s[i].textContent));
location.href=u;