?? script_main.js
字號:
//END LOC SECTION//
window.onload=LoadPage;
window.onunload=Window_Unload;
window.onresize=ResizeWindow;
window.onbeforeprint = set_to_print;
window.onafterprint = reset_form;
var languageSelection;
var scrollPos = 0;
function LoadPage()
{ if(IsEvilUrl())
{
ReloadEvilUrlAsGoodUrl();
return; // in just a moment, page will reload.
}
// show correct language
languageSelection = Load("language");
if(languageSelection == null)
languageSelection = "all";
ChangeLanguage(languageSelection);
ResizeWindow();
// vs70.js did this to allow up/down arrow scrolling, I think
try { mainSection.setActive(); } catch(e) { }
// make body visible, now that we're ready to render
document.body.style.display = "";
//set the scroll position
try{mainSection.scrollTop = scrollPos;}
catch(e){}
//START: Feedback Integration
document.feedback = new FeedBack(L_alias, L_product, L_deliverable, L_productversion, L_docversion, L_FeedBackDivID);
document.feedback.StartFeedBack("fb");
//END: Feedback Integration
}
function Window_Unload()
{
if(IsGoodUrl())
{
// save persistable data (except when unloading from a "bad url")
Save("language", languageSelection);
}
}
function ResizeWindow()
{
if (document.body.clientWidth==0) return;
var header = document.getElementById("header");
var mainSection = document.getElementById("mainSection");
if (mainSection == null) return;
document.body.scroll = "no"
if (window.ActiveXObject)
mainSection.style.overflow= "auto";
header.style.width= document.body.offsetWidth - 2;
mainSection.style.paddingRight = "20px"; // Width issue code
mainSection.style.width= document.body.offsetWidth - 4;
mainSection.style.top=0;
if (document.body.offsetHeight > header.offsetHeight + 10)
mainSection.style.height= document.body.offsetHeight - (header.offsetHeight + 10)
else
mainSection.style.height=0
try
{
mainSection.setActive();
}
catch(e)
{
}
}
function ChangeLanguage_CheckKey(key)
{
if(window.event.keyCode == 13)
ChangeLanguage(key);
}
function ChangeLanguage(key)
{
languageSelection = key;
var spanElements = document.getElementsByTagName("span");
for(i = 0; i < spanElements.length; ++i)
{
if(spanElements[i].codeLanguage != null)
{
if((spanElements[i].codeLanguage == languageSelection) || (languageSelection == "all") || (spanElements[i].codeLanguage == ""))
{
spanElements[i].style.display = "block";
}
else
{
spanElements[i].style.display = "none";
}
}
}
var spanElements = document.getElementsByTagName("span");
for(i = 0; i < spanElements.length; ++i)
{
if(spanElements[i].name != null)
{
if(spanElements[i].name == "label")
{
if(languageSelection == "all")
{
spanElements[i].style.display = "block";
}
else
{
spanElements[i].style.display = "none";
}
}
}
}
}
function ChangeSeeAlso()
{
var url = selectSeeAlso.options[selectSeeAlso.selectedIndex].value;
location.href = url;
}
function IsEvilUrl()
{
var url = "" + document.location + ".";
var r = url.indexOf("mk:@MSITStore") != -1;
return r;
}
function IsGoodUrl()
{
return !IsEvilUrl();
}
function ReloadEvilUrlAsGoodUrl()
{
var url = "" + document.location + ".";
var i = url.indexOf("mk:@MSITStore");
if(i != -1)
{
url = "ms-its:" + url.substring(14, url.length - 1);
document.location.replace(url);
}
}
function Load(key)
{
try
{
userDataCache.load("docSettings");
var value = userDataCache.getAttribute(key);
return value;
}
catch(e){}
}
function Save(key, value)
{
try
{
userDataCache.setAttribute(key, value);
userDataCache.save("docSettings");
}
catch(e){}
}
function loadAll(){
try
{
scrollPos = allHistory.getAttribute("Scroll");
}
catch(e){}
}
function saveAll(){
try
{
allHistory.setAttribute("Scroll", mainSection.scrollTop);
}
catch(e){}
}
function set_to_print()
{
//breaks out of divs to print
var i;
if (window.text)document.getElementsByTagName("*").text.style.height = "auto";
var allElements = document.getElementsByTagName("*");
for (i=0; i < allElements.length; i++)
{
if (allElements[i].tagName == "body")
{
allElements[i].scroll = "yes";
}
if (allElements[i].id == "header")
{
allElements[i].style.margin = "0px 0px 0px 0px";
allElements[i].style.width = "100%";
}
if (allElements[i].id == "mainSection")
{
allElements[i].style.overflow = "visible";
allElements[i].style.top = "5px";
allElements[i].style.width = "100%";
allElements[i].style.padding = "0px 10px 0px 30px";
}
}
}
function reset_form()
{
//returns to the div nonscrolling region after print
document.location.reload();
}
/*************************************************************************
* WSS UX FeedBack Class
* Author: Scott Kuykendall (scottku)
* Date: 2/8/2004
* revisions:
* 2/8/2004 Stubbed out in preperation for mailto re-write.
* It will nolonger be mailto it will be FeedBack. :)
*************************************************************************/
/*************************************************************************
* Constructor ***********************************************************
*************************************************************************/
function FeedBack
(
_Alias,
_Product,
_Deliverable,
_ProductVersion,
_DocumentationVersion,
_FeedBackDivID
)
{
this.Alias = _Alias;
this.Product = _Product;
this.Deliverable = _Deliverable;
this.ProductVersion = _ProductVersion;
this.DocumentationVersion = _DocumentationVersion;
this.FeedBackDivID = _FeedBackDivID;
this.DefaultBody = this.DefaultBody;
}
/*************************************************************************
*Member Properties ******************************************************
*************************************************************************/
/*************************************************************************
* START: LOCALIZATION SECTION 1 OF 1 ************************************
*************************************************************************/
//START: Text Regions
FeedBack.prototype.FeedbackIntroduction = L_fbintroduction; // replaced bug 5104 L_fdintro;
FeedBack.prototype.WhyWrong = L_fdwhywrong;
FeedBack.prototype.WhatWrong = L_fdwhatwrong;
FeedBack.prototype.InformationWrong = L_fdinfowrong;
FeedBack.prototype.NeedsMore = L_fdneedsmore;
FeedBack.prototype.NotExpected = L_fdnotexpected;
// added for bug 5104
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -