?? global.js
字號:
function ToggleSendToFriend() {
sendToFriendForm = document.getElementById('SendToFriendForm');
sendToFriendButton = document.getElementById('SendToFriendButton');
if (sendToFriendForm.style.visibility == "hidden") {
sendToFriendForm.style.visibility = "visible";
sendToFriendForm.style.display = 'block';
} else {
sendToFriendForm.style.visibility = "hidden";
sendToFriendForm.style.display = 'none';
}
//sendToFriendForm.style.left = getposOffset(sendToFriendButton, "left") - sendToFriendForm.offsetWidth + sendToFriendButton.offsetWidth;
sendToFriendForm.style.left = getposOffset(sendToFriendButton, "left") - (sendToFriendForm.offsetWidth / 2) + (sendToFriendButton.offsetWidth / 2);
sendToFriendForm.style.top = getposOffset(sendToFriendButton, "top") + sendToFriendButton.offsetHeight;
}
function ToggleAddComment() {
commentMenu = document.getElementById('CommentMenu');
commentButton = document.getElementById('CommentButton');
commentMenu.style.left = getposOffset(commentButton, "left");
commentMenu.style.top = getposOffset(commentButton, "top") + commentButton.offsetHeight;
if (commentMenu.style.visibility == "hidden") {
commentMenu.style.visibility = "visible";
commentMenu.style.display = 'block';
} else {
commentMenu.style.visibility = "hidden";
commentMenu.style.display = 'none';
}
}
function ToggleGalleryThumbnail(pictureID) {
largeThumbDiv = document.getElementById('SecondaryThumbDiv' + pictureID);
smallThumb = document.getElementById('SmallThumb' + pictureID);
if (largeThumbDiv.style.visibility == "hidden") {
largeThumbDiv.style.visibility = "visible";
largeThumbDiv.style.display = 'block';
} else {
largeThumbDiv.style.visibility = "hidden";
largeThumbDiv.style.display = 'none';
}
largeThumbDiv.style.left = getposOffset(smallThumb, "left") - ((largeThumbDiv.offsetWidth - smallThumb.offsetWidth) / 2);
largeThumbDiv.style.top = getposOffset(smallThumb, "top") - ((largeThumbDiv.offsetHeight - smallThumb.offsetHeight) / 2);
}
function ToggleRateMenu() {
rateMenu = document.getElementById('RateMenu');
rateButton = document.getElementById('RateButton');
rateMenu.style.left = getposOffset(rateButton, "left");
rateMenu.style.top = getposOffset(rateButton, "top") + rateButton.offsetHeight;
if (rateMenu.style.visibility == "hidden") {
rateMenu.style.visibility = "visible";
rateMenu.style.display = 'block';
} else {
rateMenu.style.visibility = "hidden";
rateMenu.style.display = 'none';
}
}
function ToggleSearchMenu() {
searchMenu = document.getElementById('SearchMenu');
searchButton = document.getElementById('SearchButton');
searchMenu.style.left = getposOffset(searchButton, "left");
searchMenu.style.top = getposOffset(searchButton, "top") + searchButton.offsetHeight;
if (searchMenu.style.visibility == "hidden") {
searchMenu.style.visibility = "visible";
searchMenu.style.display = 'block';
} else {
searchMenu.style.visibility = "hidden";
searchMenu.style.display = 'none';
}
}
function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}
function ToggleMenuOnOff (menuName) {
menu = document.getElementById(menuName);
if (menu.style.display == 'none') {
menu.style.display = 'block';
} else {
menu.style.display = 'none';
}
}
function OpenWindow (target) {
window.open(target, "_Child", "toolbar=no,scrollbars=yes,resizable=yes,width=500,height=400");
}
function OpenPostWindow (target) {
window.open(target, "_Child", "resizable=yes,width=800,height=700");
}
function OpenUserPostWindow (target) {
window.open(target,"_Child","toolbar=no,scrollbars=yes,resizable=yes,width=800,height=700");
}
function OpenSmallPaperWindow (target) {
window.open(target, "_Child", "resizable=no,width=450,height=450");
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -