firefox userChrome.js greasemonkeyスクリプトスレ 3
■ このスレッドは過去ログ倉庫に格納されています
0665名無しさん@お腹いっぱい。
2008/01/01(火) 23:09:23ID:hkQTqvyb0// Get text of link.
linkText : function (target) {
var text = gatherTextUnder( target );
if (!text || !text.match(/\S/)) {
text = target.getAttribute("title");
if (!text || !text.match(/\S/)) {
if (target.hasAttribute("alt")){
text = target.getAttribute("alt");
//fx2
if (text.match(/画像ファイル ".+" は壊れているため、表示できませんでした。/)) text = null;
//fx3
if(text.match(/.*\/(.+)$/)) text = RegExp.$1;
}
if (!text || !text.match(/\S/)) {
if(target.hasAttribute("href")) text = target.href;
if(target.hasAttribute("src")) text = target.src;
if(text.match(/.*\/(.+)$/)) text = RegExp.$1;
}
}
}
return text;
},
■ このスレッドは過去ログ倉庫に格納されています