2001-11-25 Bookmarklet

1 Bookmarklet

  • Message を数値文字参照に変換する bookmarklet (orkut)
javascript:z=document.f;s=z.textboxSubject;s.value=h(s);b=z.textboxBody;b.value=h(b);void(0);function%20h(e){x=e.value;y=%22%22;for(n=0;n<x.length;n++)y+=(%22&#%22+(x.charCodeAt(n))+%22;%22);return(y);}
  • HTTP応答ヘッダを表示するWinIE専用のbookmarklet
javascript:(function(){var d=document;var o=new ActiveXObject("Microsoft.XMLHTTP");o.open("HEAD",d.URL,false);o.send();d.body.innerText=o.Status+" "+o.StatusText+"\n"+o.GetAllResponseHeaders();focus();})();

スターダストさん

  • CSSブロック表示
javascript:(function()%7Bvar%20newSS;newSS=document.getElementById('codepoetry-debug-stylesheet');if(newSS)%7BnewSS.href=null;document.documentElement.childNodes%5B0%5D.removeChild(newSS);%7D%20else%20%7BnewSS=document.createElement('link');newSS.rel='stylesheet';newSS.type='text/css';newSS.href='http://www.stylesheet-stylebook.com/stuff/css-debug-2.css';newSS.id='codepoetry-debug-stylesheet';document.documentElement.childNodes%5B0%5D.appendChild(newSS);%7D%7D)()

Stylesheet Stylebookより

  • アドレス偽装有無の確認
javascript:alert("The real URL is: " + location.protocol + "//" + location.hostname + "/" + "\nThe address URL is: " + location.href + "\n" + "If the server names do not match, this may be a spoof.");

2 CSSブロック表示で使用するスタイルシート

html:after
{
	content: "RED: SPAN/ID; YELLOW: SPAN/CLASS; ORANGE: DIV/ID; BLUE: DIV/CLASS; TABLE/CLASS: GREEN; TABLE/ID: LIGHT BLUE";
	background: rgba(255,255,255,0.5);
	color: black;
	font-family: monospace;
}

div, span, img
{
	outline: 1px solid black;
	-moz-outline: 1px solid black;
}

[name]:before
{
	content: 'NAME: \'' attr(name) '\'';
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: rgba(255,255,255,0.1);
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

span[id]:before
{
	content: 'ID: \'' attr(id) '\'';
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: red;
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

span[id]
{
	outline: 1px solid red;
	-moz-outline: 1px solid red;
	background: rgba(255,0,0,0.1);
}

span[class]:before
{
	content: 'CLASS: \'' attr(class) '\'';
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: yellow;
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

span[class]
{
	outline: 1px solid yellow;
	-moz-outline: 1px solid yellow;
	background: rgba(255,255,0,0.1);
}

div[id]:before
{
	content: 'ID: \'' attr(id) '\'';
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: orange;
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

div[id]
{
	outline: 1px solid orange;
	-moz-outline: 1px solid orange;
	background: rgba(255,128,0,0.1);
}

div[class]:before
{
	content: 'CLASS: \'' attr(class) '\'';
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: blue;
	color: white;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

div[class]
{
	outline: 1px solid blue;
	-moz-outline: 1px solid blue;
	background: rgba(0,0,255,0.1);
}

table[class]:before, TR[class]:before, TD[class]:before
{
	content: 'CLASS: \'' attr(class) '\'';
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: #6F6;
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

table[class], tr[class], td[class]
{
	background: rgba(100, 255, 100, 0.1);
	outline: 1px solid #6F6;
	-moz-outline: 1px solid #6F6;
}

table[id]:before, tr[id]:before, td[id]:before
{
	content: 'ID: \'' attr(id) '\'';
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: #66F;
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

table[id], tr[id], td[id]
{
	background: rgba(100, 100, 255, 0.1);
	outline: 1px solid #66F;
	-moz-outline: 1px solid #66F;
}

h1:before
{
	content: "H1";
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: rgba(255,255,255,0.1);
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

h1
{
	outline: 1px solid black;
	-moz-outline: 1px solid black;
}

h2:before
{
	content: "H2";
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: rgba(255,255,255,0.1);
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

h2
{
	outline: 1px solid black;
	-moz-outline: 1px solid black;
}

h3:before
{
	content: "H3";
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: rgba(255,255,255,0.1);
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

h3
{
	outline: 1px solid black;
	-moz-outline: 1px solid black;
}

h4:before
{
	content: "H4";
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: rgba(255,255,255,0.1);
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

h4
{
	outline: 1px solid black;
	-moz-outline: 1px solid black;
}

h5:before
{
	content: "H5";
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: rgba(255,255,255,0.1);
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

h5
{
	outline: 1px solid black;
	-moz-outline: 1px solid black;
}

h6:before
{
	content: "H6";
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: rgba(255,255,255,0.1);
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

h6
{
	outline: 1px solid black;
	-moz-outline: 1px solid black;
}