📄 dingbats.js
字号:
semi = ";";
str = "<STYLE id='dings'>";
str += ".dlink {";
str += "color: #666666" + semi;
str += "text-decoration: none" + semi + "}";
if (navigator.appName=="Netscape") {
str += ".test { position: relative; visibility: hidden;}";
} else { str += ".iedlink {color: #FFFFFF; text-decoration: none;}";}
str += "</STYLE>";
document.write(str);
// needed to reset the DTHML in Navigator
// sets the resize handler after the page is done loading (otherwise every load would be interpreted as a resize too). I have also moved loadImage() here, because the script wasn't behaving properly from the body ONLOAD - JD VIDEOMATION: I added to Window.focus to switch focus on the onload feature because this is where the dingbat resize function is done which is already implement on all files. The imagemax var makes it so it only runs load image if their are images in the file.
function reDo() {
top.location.reload();
}
function setResize() {
window.focus();
if (navigator.appName=="Netscape") {
setTimeout("top.onresize=reDo", 500);
}
if (imagemax != 0) {
loadImage();}
}
if (navigator.platform == ("MacPPC" || "Mac68k")) {
var ding = "º";
} else {var ding = "¤";}
// To capture click events. Netscape has a bug which prevents it from following the onClick handler correctly from a link stuck with a <span> tag which has a class and ID -- bizarre but true
if (navigator.appName == "Netscape") {
document.captureEvents(Event.CLICK);
document.onClick = clickHandler;
}
// the clickhandler which redirects the intercepted event. Every dingbat anchor has to have the word "ding" in it for this to work properly, and only dingbats should point to them (the search can index them of course though)
function clickHandler(evnt) {
str = '_' + evnt.target;
if (str.search(/ding/) != -1) {
top.TEXT.location.hash = str.substring(str.indexOf('#') + 1);
return false;
}
else { return true; }
}
function testChange(id1) {
document[id1].visibility="show";
}
function testChangeO(id1,id2) {
document[id1].visibility="hide";
}
function create_link(linknum) {
var thisding = "ding" + linknum;
var thisding1 = "'ding1_" + linknum+"'";
var thisding2 = "'ding2_" + linknum+"'";
var thislink = "ding" + linknum + "_link";
var thishref = "'" + location.pathname + "#dingp" + linknum + "'";
var iding = "'ilay" + linknum + "'";
if (navigator.appName == "Netscape") {
str="<nobr> <A class='dlink' href='" + dingbase + "#dingp" + linknum + "' onClick='top.TEXT.location.href=\"#dingp"+linknum+"\"; return false' onMouseOver=\"testChange("+thisding2+")\">" + ding + "</A>";
str+=" <wbr><span class='test' id="+thisding2+"><a class='dlink' href='" + dingbase + "#dingp" + linknum + "' onClick='top.TEXT.location.href=\"#dingp"+linknum+"\"; return false' onMouseOver=\"testChange("+thisding2+")\" onMouseOut=\"testChangeO("+thisding2+")\">" + dingtext + linknum + "</a>";
str+="</span></nobr>";
document.write(str);
} else {
str="<span class='dlink' onMouseOver='document.all."+thislink+".style.color=\"#666666\"'> "+ding+"</span>";
str+="<a id='"+thislink+"' onMouseOver='this.style.color=\"#666666\"' onMouseOut='this.style.color=\"#FFFFFF\"' class='iedlink' href='" + dingbase + "#dingp" + linknum + "' onClick='top.TEXT.location.href=\"#dingp"+linknum+"\"; return false'> "+dingtext+linknum+"</a>";
document.write(str);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -