Skip navigation.

おぺら ぷらす あるふぁ。

Opera、Excel、Windowsなんかの備忘録とか(ぼやき含む) Japanese only

はてな匿名ダイアリーのキーワードリンクを無効にするuser.js。

,

個人的にうっとぉしいのでtemp_hさん作のdisableHatenaKey.jsをコピーして改悪。
JavaScriptよく分からんが、まぁ、動くからよし。
でも、キーワードの下線が入りっぱなしなんだよね…どうやって消すんだろ?

// userJS for Opera 8.00
// 2005-05-05
// 2005-05-11 bug fix : was not executed in hatena group
// 2005-05-12 some rearrangement

// disable hatena keyword link
if( location.hostname.match(/[dg]\.hatena\.ne\.jp$/))
document.addEventListener('load', disableHatenaKeyword, false);

/* disable hatena keyword link */
function disableHatenaKeyword() {
if( document.body )
searchKeyword(document.getElementsByTagName('body')[0]);

/*search keyword ancher and replace with span. recursive function : searchKeyword(node) */
function searchKeyword(n){
if(n.nodeType == 1 && n.tagName.toUpperCase() == 'A' && (n.className == 'keyword' || n.className == 'okeyword')){
var r = document.createElement('SPAN');
r.className = 'keyword';
for(var j = 0; j < n.childNodes.length; j++)
r.appendChild(n.childNodes[j].cloneNode(true));
n.parentNode.replaceChild(r, n);
}else if(n.hasChildNodes()){
for(var i = 0; i < n.children.length; i++)
searchKeyword(n.children[i]);
}
return;
}
}

// disable anond.hatelabo keyword link
if( location.hostname.match(/anond\.hatelabo\.jp$/))
document.addEventListener('load', disableHatenaKeyword, false);

/* disable hatena keyword link */
function disableHatenaKeyword() {
if( document.body )
searchKeyword(document.getElementsByTagName('body')[0]);

/*search keyword ancher and replace with span. recursive function : searchKeyword(node) */
function searchKeyword(n){
if(n.nodeType == 1 && n.tagName.toUpperCase() == 'A' && (n.className == 'keyword' || n.className == 'okeyword')){
var r = document.createElement('SPAN');
r.className = 'keyword';
for(var j = 0; j < n.childNodes.length; j++)
r.appendChild(n.childNodes[j].cloneNode(true));
n.parentNode.replaceChild(r, n);
}else if(n.hasChildNodes()){
for(var i = 0; i < n.children.length; i++)
searchKeyword(n.children[i]);
}
return;
}
}

movatwitter用CSSとスモールスクリーン表示。写真コンテストにのっかってみる。

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies