📄 script.js
字号:
function LoadSld( slideId )
{
if( !g_supportsPPTHTML ) return
if( slideId )
parent.SldUpdated(slideId)
g_origSz=parseInt(SlideObj.style.fontSize)
g_origH=SlideObj.style.posHeight
g_origW=SlideObj.style.posWidth
g_scaleHyperlinks=(document.all.tags("AREA").length>0)
if( g_scaleHyperlinks )
InitHLinkArray()
if( g_scaleInFrame||(IsWin("PPTSld") && parent.IsFullScrMode() ) )
document.body.scroll="no"
_RSW()
if( IsWin("PPTSld") && parent.IsFullScrMode() ) {
document.oncontextmenu=parent._CM;
self.focus()
}
}
function MakeSldVis( fTrans )
{
fTrans=fTrans && g_showAnimation
if( fTrans )
{
if( g_bgSound ) {
idx=g_bgSound.indexOf(",");
pptSound.src=g_bgSound.substr( 0, idx );
pptSound.loop= -(parseInt(g_bgSound.substr(idx+1)));
}
SlideObj.filters.revealtrans.Apply()
}
SlideObj.style.visibility="visible"
if( fTrans )
SlideObj.filters.revealtrans.Play()
}
function MakeNotesVis()
{
if( !IsNts() ) return false
SlideObj.style.display="none"
nObj = document.all.item("NotesObj")
parent.SetHasNts(0)
if( nObj ) {
nObj.style.display=""
parent.SetHasNts(1)
}
return 1
}
function Redirect( frmId,sId )
{
var str=document.location.hash,idx=str.indexOf('#')
if(idx>=0) str=str.substr(1);
if( window.name != frmId && ( sId != str) ) {
obj = document.all.item("Main-File")
window.location.href=obj.href+"#"+sId
return 1
}
return 0
}
function HideMenu() { if( frames["PPTSld"] && PPTSld.document.all.item("ctxtmenu") && PPTSld.ctxtmenu.style.display!="none" ) { PPTSld.ctxtmenu.style.display='none'; return true } return false }
function IsWin( name ) { return window.name == name }
function IsNts() { return IsWin("PPTNts") }
function IsSldOrNts() { return( IsWin("PPTSld")||IsWin("PPTNts") ) }
function SupportsPPTAnimation() { return( navigator.platform == "Win32" && navigator.appVersion.indexOf("Windows")>0 ) }
function SupportsPPTHTML()
{
var appVer=navigator.appVersion, msie=appVer.indexOf("MSIE "), ver=0
if( msie >= 0 )
ver=parseFloat( appVer.substring( msie+5, appVer.indexOf(";",msie) ) )
else
ver=parseInt(appVer)
return( ver >= 4 && msie >= 0 )
}
var MHTMLPrefix = CalculateMHTMLPrefix();
function CalculateMHTMLPrefix()
{
if ( document.location.protocol == 'mhtml:') {
href=new String(document.location.href)
Start=href.indexOf('!')+1
End=href.lastIndexOf('/')+1
if (End < Start)
return href.substring(0, Start)
else
return href.substring(0, End)
}
return '';
}
function _RSW()
{
if( !g_supportsPPTHTML || IsNts() ||
( !g_scaleInFrame && (( window.name != "PPTSld" ) || !parent.IsFullScrMode()) ) )
return
cltWidth=document.body.clientWidth
cltHeight=document.body.clientHeight
factor=(1.0*cltWidth)/g_origW
if( cltHeight < g_origH*factor )
factor=(1.0*cltHeight)/g_origH
newSize = g_origSz * factor
if( newSize < 1 ) newSize=1
s=SlideObj.style
s.fontSize=newSize+"px"
s.posWidth=g_origW*factor
s.posHeight=g_origH*factor
s.posLeft=(cltWidth-s.posWidth)/2
s.posTop=(cltHeight-s.posHeight)/2
if( g_scaleHyperlinks )
ScaleHyperlinks( factor )
}
function _KPH()
{
if( IsNts() ) return;
if( !parent.IsFramesMode() && event.keyCode == 27 && !parent.HideMenu() )
parent.window.close( self );
else if( event.keyCode == 32 )
{
if( window.name == "PPTSld" )
parent.PPTSld.DocumentOnClick();
else
parent.GoToNextSld();
}
}
function DocumentOnClick()
{
if( IsNts() || parent.HideMenu() ) return;
if( ( g_allowAdvOnClick && !parent.IsFramesMode() ) ||
(event && (event.keyCode==32) ) )
parent.GoToNextSld();
}
var g_supportsPPTHTML = SupportsPPTHTML(), g_scaleInFrame = true, gId="", g_bgSound="",
g_scaleHyperlinks = false, g_allowAdvOnClick = true, g_showInBrowser = false;
var g_showAnimation = g_supportsPPTHTML && SupportsPPTAnimation() && ( (window.name=="PPTSld" && !parent.IsFramesMode()) || g_showInBrowser );var g_hasTrans = false, g_autoTrans = false, g_transSecs = 0;
var g_animManager = null;
var ENDSHOW_MESG="放映结束,单击鼠标退出。", SCREEN_MODE="Frames", gIsEndShow=0, NUM_VIS_SLDS=211, SCRIPT_HREF="script.js", FULLSCR_HREF="fullscreen.htm";
var gCurSld = gPrevSld = 1, g_offset = 0, gNtsOpen = gHasNts = gOtlTxtExp = gNarrationPaused = false, gOtlOpen = true
window.gPPTHTML=SupportsPPTHTML()
function UpdNtsPane(){ PPTNts.location.replace( MHTMLPrefix+GetHrefObj( gCurSld ).mNtsHref ) }
function UpdNavPane( sldIndex ){ if(gNavLoaded) PPTNav.UpdNav() }
function UpdOtNavPane(){ if(gOtlNavLoaded) PPTOtlNav.UpdOtlNav() }
function UpdOtlPane(){ if(gOtlLoaded) PPTOtl.UpdOtl() }
function SetHasNts( fVal )
{
if( gHasNts != fVal ) {
gHasNts=fVal
UpdNavPane()
}
}
function ToggleOtlText()
{
gOtlTxtExp=!gOtlTxtExp
UpdOtlPane()
}
function ToggleOtlPane()
{
frmset=document.all("PPTHorizAdjust")
frm=document.all("PPTOtl")
if( gOtlOpen )
frmset.cols="*,100%"
else
frmset.cols="20%,80%"
gOtlOpen=!gOtlOpen
frm.noResize=!frm.noResize
UpdOtNavPane()
}
function ToggleNtsPane()
{
frmset=document.all("PPTVertAdjust")
frm=document.all("PPTNts")
if( gNtsOpen )
frmset.rows="100%,*"
else
frmset.rows="80%,20%"
gNtsOpen=!gNtsOpen
UpdNtsPane()
}
function FullScreen(){ window.open( MHTMLPrefix+FULLSCR_HREF,null,"fullscreen=yes" ) }
function ToggleVNarration()
{
rObj=PPTSld.document.all("NSPlay")
if( rObj ) {
if( gNarrationPaused )
rObj.Play()
else
rObj.Pause()
gNarrationPaused=!gNarrationPaused
}
}
function GetCurSldNum()
{
obj=GetHrefObj(gCurSld)
if( obj.mOrigVis == 1 )
return obj.mSldIdx
else
return gCurSld
}
function GetNumSlds()
{
if( GetHrefObj(gCurSld).mOrigVis == 1 )
return NUM_VIS_SLDS
else
return gDocTable.length
}
function GetSldNum( href )
{
for(ii=0; ii<gDocTable.length; ii++) {
if ( gDocTable[ii].mSldHref == href )
return ii+1
}
return 1
}
function GetHrefObj( sldIdx ){ return gDocTable[sldIdx-1] }
function IsFramesMode(){ return ( SCREEN_MODE == "Frames" ) }
function IsFullScrMode(){ return ( SCREEN_MODE == "FullScreen" ) }
function GoToNextSld()
{
ii=gCurSld + 1
if( GetHrefObj( ii-1 ).mOrigVis == 0 ) {
if( ii<=gDocTable.length ) {
obj=GetHrefObj(ii)
obj.mVis=1
GoToSld(obj.mSldHref)
return
}
}
else {
obj=GetHrefObj( ii )
while ( obj && ( obj.mOrigVis == 0 ) )
obj=GetHrefObj(ii++)
if( obj && obj.mOrigVis ) {
GoToSld(obj.mSldHref)
return
}
}
if( !IsFramesMode() ) EndShow()
}
function GoToPrevSld()
{
ii=gCurSld-1
if( ii > 0 ) {
obj=GetHrefObj(ii)
while ( ( obj.mVis == 0 ) && ( ii>0 ) )
obj=GetHrefObj(ii--)
GoToSld(obj.mSldHref)
}
}
function GoToFirst(){ GoToSld( GetHrefObj(1).mSldHref ) }
function GoToLast()
{
ii=gDocTable.length
if( ii != gCurSld )
GoToSld( GetHrefObj(ii).mSldHref )
}
function GoToSld( href )
{
if( PPTSld.event ) PPTSld.event.cancelBubble=true
GetHrefObj( GetSldNum(href) ).mVis=1
PPTSld.location.href=MHTMLPrefix+href
}
function SldUpdated( id )
{
if( id == GetHrefObj(gCurSld).mSldHref ) return
gPrevSld=gCurSld
gCurSld=GetSldNum(id)
if( IsFramesMode() ) {
UpdNavPane(); UpdOtlPane(); UpdNtsPane()
}
}
function PrevSldViewed(){ GoToSld( GetHrefObj(gPrevSld).mSldHref ) }
function HasPrevSld() { return ( gIsEndShow || ( gCurSld != 1 && GetHrefObj( gCurSld-1 ).mVis == 1 )||( GetCurSldNum() > 1 ) ) }
function HasNextSld() { return (GetCurSldNum() != GetNumSlds()) }
function EndShow()
{
if( PPTSld.event ) PPTSld.event.cancelBubble=true
doc=PPTSld.document
doc.open()
doc.writeln('<html><head><script defer>function CloseWindow(){ if( parent.HideMenu() ) return; if( !parent.IsFramesMode() && event && (event.keyCode==27 || event.keyCode==32 || event.type=="click" ) ) parent.window.close( self ); } function Unload() { parent.gIsEndShow=0; } function SetupEndShow() { parent.gIsEndShow=1; document.body.scroll="no"; document.onkeypress=CloseWindow; document.onclick=CloseWindow; document.oncontextmenu=parent._CM; }</script></head><body bgcolor=black onload=SetupEndShow() onunload=Unload()><center><p><font face=Tahoma color=white size=2><br><b>' + ENDSHOW_MESG + '</b></font></p></center></body></html>')
doc.close()
}
function SetSldVisited(){ gDocTable[gCurSld-1].mVisited=true }
function IsSldVisited(){ return gDocTable[gCurSld-1].mVisited }
function hrefList( sldHref, visible, sldIdx )
{
this.mSldHref= this.mNtsHref = sldHref
this.mSldIdx = sldIdx
this.mOrigVis= this.mVis = visible
this.mVisited= false
}
var gDocTable = new Array(
new hrefList("slide0001.htm", 1, 1),
new hrefList("slide0002.htm", 1, 2),
new hrefList("slide0003.htm", 1, 3),
new hrefList("slide0004.htm", 1, 4),
new hrefList("slide0046.htm", 1, 5),
new hrefList("slide0005.htm", 1, 6),
new hrefList("slide0006.htm", 1, 7),
new hrefList("slide0024.htm", 1, 8),
new hrefList("slide0025.htm", 1, 9),
new hrefList("slide0099.htm", 1, 10),
new hrefList("slide0007.htm", 1, 11),
new hrefList("slide0008.htm", 1, 12),
new hrefList("slide0009.htm", 1, 13),
new hrefList("slide0010.htm", 1, 14),
new hrefList("slide0011.htm", 1, 15),
new hrefList("slide0029.htm", 1, 16),
new hrefList("slide0012.htm", 1, 17),
new hrefList("slide0013.htm", 1, 18),
new hrefList("slide0014.htm", 1, 19),
new hrefList("slide0015.htm", 1, 20),
new hrefList("slide0016.htm", 1, 21),
new hrefList("slide0017.htm", 1, 22),
new hrefList("slide0030.htm", 1, 23),
new hrefList("slide0031.htm", 1, 24),
new hrefList("slide0018.htm", 1, 25),
new hrefList("slide0020.htm", 1, 26),
new hrefList("slide0021.htm", 1, 27),
new hrefList("slide0032.htm", 1, 28),
new hrefList("slide0022.htm", 1, 29),
new hrefList("slide0023.htm", 1, 30),
new hrefList("slide0034.htm", 1, 31),
new hrefList("slide0041.htm", 1, 32),
new hrefList("slide0035.htm", 1, 33),
new hrefList("slide0037.htm", 1, 34),
new hrefList("slide0036.htm", 1, 35),
new hrefList("slide0040.htm", 1, 36),
new hrefList("slide0038.htm", 1, 37),
new hrefList("slide0039.htm", 1, 38),
new hrefList("slide0042.htm", 1, 39),
new hrefList("slide0043.htm", 1, 40),
new hrefList("slide0044.htm", 1, 41),
new hrefList("slide0045.htm", 1, 42),
new hrefList("slide0049.htm", 1, 43),
new hrefList("slide0050.htm", 1, 44),
new hrefList("slide0047.htm", 1, 45),
new hrefList("slide0048.htm", 1, 46),
new hrefList("slide0051.htm", 1, 47),
new hrefList("slide0052.htm", 1, 48),
new hrefList("slide0053.htm", 1, 49),
new hrefList("slide0055.htm", 1, 50),
new hrefList("slide0056.htm", 1, 51),
new hrefList("slide0054.htm", 1, 52),
new hrefList("slide0057.htm", 1, 53),
new hrefList("slide0058.htm", 1, 54),
new hrefList("slide0059.htm", 1, 55),
new hrefList("slide0060.htm", 1, 56),
new hrefList("slide0061.htm", 1, 57),
new hrefList("slide0062.htm", 1, 58),
new hrefList("slide0063.htm", 1, 59),
new hrefList("slide0066.htm", 1, 60),
new hrefList("slide0067.htm", 1, 61),
new hrefList("slide0068.htm", 1, 62),
new hrefList("slide0069.htm", 1, 63),
new hrefList("slide0070.htm", 1, 64),
new hrefList("slide0071.htm", 1, 65),
new hrefList("slide0072.htm", 1, 66),
new hrefList("slide0073.htm", 1, 67),
new hrefList("slide0074.htm", 1, 68),
new hrefList("slide0075.htm", 1, 69),
new hrefList("slide0076.htm", 1, 70),
new hrefList("slide0077.htm", 1, 71),
new hrefList("slide0078.htm", 1, 72),
new hrefList("slide0079.htm", 1, 73),
new hrefList("slide0080.htm", 1, 74),
new hrefList("slide0081.htm", 1, 75),
new hrefList("slide0082.htm", 1, 76),
new hrefList("slide0083.htm", 1, 77),
new hrefList("slide0084.htm", 1, 78),
new hrefList("slide0085.htm", 1, 79),
new hrefList("slide0086.htm", 1, 80),
new hrefList("slide0087.htm", 1, 81),
new hrefList("slide0088.htm", 1, 82),
new hrefList("slide0089.htm", 1, 83),
new hrefList("slide0090.htm", 1, 84),
new hrefList("slide0091.htm", 1, 85),
new hrefList("slide0092.htm", 1, 86),
new hrefList("slide0093.htm", 1, 87),
new hrefList("slide0094.htm", 1, 88),
new hrefList("slide0095.htm", 1, 89),
new hrefList("slide0096.htm", 1, 90),
new hrefList("slide0097.htm", 1, 91),
new hrefList("slide0098.htm", 1, 92),
new hrefList("slide0101.htm", 1, 93),
new hrefList("slide0103.htm", 1, 94),
new hrefList("slide0104.htm", 1, 95),
new hrefList("slide0105.htm", 1, 96),
new hrefList("slide0107.htm", 1, 97),
new hrefList("slide0108.htm", 1, 98),
new hrefList("slide0109.htm", 1, 99),
new hrefList("slide0110.htm", 1, 100),
new hrefList("slide0111.htm", 1, 101),
new hrefList("slide0112.htm", 1, 102),
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -