⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flashsave.html

📁 一款很好用的浏览器
💻 HTML
字号:
<script language="javascript">

//***************************************************************
//   File name:FlashSave.html
//   Language:Javascript
//   Author:kaichun
//   Function:Provide the ability to view and save flash files
//   Version:1.21
//***************************************************************

function writearray(filesrc,filewidth,fileheight){
    swffileurl.push(filesrc);
    swffilew.push(filewidth);
    swffileh.push(fileheight);
    return;
}

function processurl(myurl,srcDocument){
	var endurl;
	if(myurl.indexOf("http://")!=-1) 
		endurl=myurl;
	else{
		var pageurl;
		var hostname=srcDocument.location.hostname;
		var pathname=srcDocument.location.pathname;
		var portname=srcDocument.location.port;
		if(portname.length==0){
			pageurl="http://"+hostname+pathname;
		}
		else{
			pageurl="http://"+hostname+":"+portname+pathname;
		}
		var pagepath=pageurl.substring(0,pageurl.lastIndexOf("/")+1);
		if(myurl.charAt(0)!="." && myurl.charAt(0)!="/") 
			endurl=pagepath+myurl;
		else if(myurl.charAt(0)=="/") 
			endurl="http://"+hostname+myurl;
		else{
			if(myurl.charAt(0)=="."){
				endurl=pagepath;
				while(myurl.charAt(0)=="."){
					myurl=myurl.substr(3);
					endurl=endurl.substring(0,endurl.length-1);
    				endurl=endurl.substring(0,endurl.lastIndexOf("/")+1);
    			}
				endurl=endurl+myurl;
			}
		}
	}
	return(endurl);
}

function getinfo(srcDocument){
	for(var i=0;i<srcDocument.applets.length;i++){
		tObject=srcDocument.applets[i];
		t=tObject.codeBase;
		ss=t.toLowerCase();
		x=tObject.classid;
		xx=x.toLowerCase();
		if(ss.indexOf("macromedia.com")>=0 || xx.indexOf("clsid:d27cdb6e-ae6d-11cf-96b8-444553540000")>=0){
			tt=tObject.getAttribute("Movie");	
			w=tObject.width;			
			h=tObject.height;
			if(w.indexOf("%")>0 || h.indexOf("%")>0 ){
				w=440;
				h=400;
			}
			tt=processurl(tt,srcDocument);
			writearray(tt,w,h);
		}
	}
	
	for(var i=0;i<srcDocument.embeds.length;i++){
		tObject=srcDocument.embeds[i];		
		t=tObject.src;				
		ss=t.toLowerCase();
		if(ss.indexOf(".swf")>0){
			tt=tObject.src;	
			w=tObject.width;			
			h=tObject.height;
			if(w.indexOf("%")>0 || h.indexOf("%")>0 ){
				w=440;
				h=400;
			}
			tt=processurl(tt,srcDocument);
			writearray(tt,w,h);
		}
	}
}

function mainwindow(){
    var outstr="";
    document.write("<HTML>\n");
    document.write("<HEAD>\n");
    document.write("<TITLE>Flash Save<\/TITLE>\n");
    document.write("<STYLE TYPE=\"TEXT\/CSS\">\n");
    document.write(".a1{text-decoration:none;color:#000000;}\n");
    document.write("a.a1:hover{text-decoration:underline;color:red}\n");
    document.write("a.a1:active{text-decoration:underline;color:#000000}\n");
    document.write("a.a1:visited{text-decoration:underline;color:#000000}\n");
    document.write("<\/STYLE>\n");
    document.write("<\/HEAD>\n");
    document.write('<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">\n');
    document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">\n');
    document.write('<tr>\n');
    document.write('<td width="150" height="310" align="right" valign="top">\n');
    document.write('<table width="150" border="0" cellspacing="0" cellpadding="0">\n');
    document.write('<tr>\n');
    document.write('<td><div id="div1"><\/div><\/td>\n');
    document.write('<\/tr>\n');
    document.write('<tr>\n');
    document.write('<td><input type="radio" value="browser" checked onclick="getwritetype(\'browser\')" name="listctrl"><font size="2">Preview<\/font><br>\n');
    document.write('<input type="radio" value="save" onclick="getwritetype(\'save\')" name="listctrl"><font size="2">Save<\/font><br>\n');
	document.write('<input type="radio" value="block" onclick="getwritetype(\'hunter\')" name="listctrl"><font size="2">Block<\/font><\/td><\/tr>\n');
    document.write('<\/table>\n');
    document.write('<\/td>\n');
    document.write('<td width="1" bgcolor="#000000"><\/td>\n');
    document.write('<td width="449" valign="top" align="center">\n');
    document.write('<div id="div2"><\/div>\n');
    document.write('<\/td>\n');
    document.write('<\/tr>\n');
    document.write('<tr><td height="10" width="150"><\/td><td width="1" bgcolor="#000000"><\/td><td width="449"><\/td><\/tr>\n');
    document.write('<tr><td colspan="3" height="1" bgcolor="#000000"><\/td><\/tr>\n');
    document.write('<tr><td colspan="3" height="4"><\/td><\/tr>\n');
    document.write('<tr>\n');
    document.write('<td colspan="3">\n');
    document.write('<font style=font-size:9pt>&nbsp;&nbsp;Help:<br>&nbsp;&nbsp;1. Preview: Preview Flash files<br>&nbsp;&nbsp;2. Save: Right click on the link and select \"Save Target As...\"<br>&nbsp;&nbsp;3. Block: Add to Content Filter</font>\n');
    document.write('<\/td>\n');
    document.write('<\/tr>\n');
    document.write('<\/table>\n');
    document.write("<SCRIPT LANGUAGE=\"JavaScript\">\n");   
    document.write('function writelist() {\n');
    document.write('var filelist="";\n');
    document.write('var mysplit="/";\n');
    document.write('if (writetype=="url") {\n');			
    document.write('for (i=0;i<swffileurl.length;i++)\n');	
    document.write('   filelist+="&nbsp;&nbsp;<font size=2><a href=\'javascript:browserswf("+i+");\'>"+swffileurl[i].substr(swffileurl[i].lastIndexOf(mysplit)+1)+"<\/a><br><\/font>";\n');
    document.write('} else if(writetype=="save") {\n');					
    document.write('for (i=0;i<swffileurl.length;i++)\n');		
    document.write('   filelist+="&nbsp;&nbsp;<font size=2><a href=\'"+swffileurl[i]+"\'>"+swffileurl[i].substr(swffileurl[i].lastIndexOf(mysplit)+1)+"<\/a><br><\/font>";\n');
    document.write('}\n');
	document.write('else if(writetype=="hunter"){\n');
	document.write('for (i=0;i<swffileurl.length;i++)\n');		
    document.write('   filelist+="&nbsp;&nbsp;<font size=2><a href=\'javascript:external.addFilter(\\\""+swffileurl[i]+"\\\",0);\'>"+swffileurl[i].substr(swffileurl[i].lastIndexOf(mysplit)+1)+"<\/a><br><\/font>";\n');
    document.write('}\n');
    document.write("div1.innerHTML=filelist;\n");
    document.write('div2.innerHTML="";\n');
    document.write('}\n');
    document.write('\n');
	document.write('function getwritetype(mytype) {\n');
    document.write('  if (mytype=="browser") {\n');
    document.write('     writetype="url";\n');			
    document.write('     writelist();\n');				
    document.write('     if (tmpcode=="")\n');
    document.write('        div2.innerHTML="";\n');	
    document.write('     else\n');					
    document.write("        div2.innerHTML=tmpcode;\n");			
    document.write('  }\n');
    document.write('  else if(mytype=="save"){\n');
    document.write('     writetype="save";\n');				
    document.write('     writelist();\n');				
    document.write('     div2.innerHTML="";\n');		
    document.write('  }\n');
	document.write('	else if(mytype=="hunter"){\n');
	document.write('		writetype="hunter";\n');
	document.write('		writelist();\n');	
	document.write('		div2.innerHTML="";\n');
	document.write('	}\n');
    document.write('}\n');
    document.write("\n");  
    document.write('function browserswf(flashpath) {\n');
    document.write('    div2.style.visibility="visible";\n');
    document.write('    div2.innerHTML=swfcode[flashpath];\n');		
    document.write('    tmpcode=swfcode[flashpath];\n');
    document.write('}\n');
    document.write("\n");
    document.write("function doscale(myvalue,mytype) {\n");
    document.write("var returnvalue;\n");
	document.write("if (mytype==\"w\") {\n");			
    document.write("if (myvalue=440) returnvalue=440;\n");
    document.write("if (myvalue>440) returnvalue=440;\n");	
    document.write("if (myvalue<440) returnvalue=myvalue;\n");
    document.write("} else {\n");
    document.write("myvalue=swffilew*myvalue/swffilewo;\n");		
    document.write("myvalue=Math.ceil(myvalue);\n");
    document.write("returnvalue=myvalue;\n");
    document.write("}\n");
    document.write("return(returnvalue);\n");
    document.write("}\n");
    document.write("\n");
    document.write("var swffileurl=new Array();\n");
    document.write("var swffilew;\n");
    document.write("var swffileh;\n");
    document.write("var swfcode=new Array();\n");
    document.write("var tmpcode=\"\";\n");
    for (i=0;i<swffileurl.length;i++) {				
        document.write("swffileurl["+i+"]=\""+swffileurl[i]+"\";\n");
		document.write("swffilewo="+swffilew[i]+";\n");
        document.write("swffilew=doscale(swffilewo,\"w\");\n");
        document.write("swffileh=doscale("+swffileh[i]+",\"h\");\n");
        document.write("swfcode["+i+"]=\"<object classid=\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\' codebase=\'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\' width=\"+swffilew+\" height=\"+swffileh+\"><param name=movie value=\'"+swffileurl[i]+"\'><param name=quality value=high><embed src=\'"+swffileurl[i]+"\' quality=high pluginspage=\'http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\' type=\'application/x-shockwave-flash\' width=\"+swffilew+\" height=\"+swffileh+\"></embed></object>\"\n");
    }
    document.write('var writetype="url";\n');				
    document.write("writelist();\n");					
    document.write("<\/SCRIPT>\n");
    document.write("<\/BODY>\n");
    document.write("<\/HTML>\n");
}

function frame_split(doc){
	if(doc.frames.length>0){
		for(var i=0;i<doc.frames.length;i++){
			try{
				var doc_frames=doc.frames[i].document;
			}
			catch(e){
				continue;
			}
			frame_split(doc_frames);
		}
		getinfo(doc);
	}
	else{
		getinfo(doc);
	}
}

var swffileurl=new Array();		
var swffilew=new Array();			
var swffileh=new Array();

frame_split(document);	

mainwindow();

</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -