1/****************************************************************** 2 title : mEmbed v1.1 3 contents : IEÆÐÄ¡·Î ÀÎÇÑ embed ű׸¦ js·Î Ãâ·ÂÇÑ´Ù. 4 ÀÌ ¼Ò½º°¡ µé¾î°¡´Â JSÆÄÀÏÀº ¹Ýµå½Ã src·Î ¿ÜºÎ¿¡¼ È£ÃâµÇ¾î¾ßÇϰí 5 <script>mEmbed("src=source.swf","width=100","height=100", "wmode=Tranpsarent");</script> 6 ¿Í °°Àº Çü½ÄÀ¸·Î Ç÷¡½¬ ű׸¦ ´ë½ÅÇØ¼ ³Ö¾îÁØ´Ù. 7 mGET ÇÔ¼ö´Â µÎ¹è¿À» ÀÌ¿ëÇÑ Å°°ªÀÇ Data ¸¦ °¡Á®¿À´Â ÇÔ¼ö.(mEmbed¿¡ ÇÊ¿ä) 8 ex) srcdata = mGET(key,value,'src'); -> phpÀÇ $srcdata = $array['src']; 9 by : http://blog.daum.net/battlej 10 ******************************************************************/ 11 12 function mGET(arrayKey, arrayValue, Value) { 13 count = arrayKey.length; 14 for(i=0;i<count;i++) { 15 if(arrayKey[i]==Value) { 16 return arrayValue[i]; 17 break; 18 } 19 } 20 } 21 22 function mEmbed() { 23 var key = new Array(); 24 var value = new Array(); 25 var contents; 26 var embed_type; 27 var error_check=0; 28 var i, j; 29 var count; 30 var data; 31 var temp; 32 if(mEmbed.arguments.length==1) { 33 contents = mEmbed.arguments[0]; 34 } else { 35 for(i=0;i<mEmbed.arguments.length;i++) { 36 temp = mEmbed.arguments[i].replace(/"|'/g,""); 37 data = temp.split('='); 38 key[i] = data[0]; 39 value[i] = data[1]; 40 count = data.length; 41 42 for(j=2;j<count;j++) { 43 value[i] += '=' + data[j]; 44 } 45 } 46 47 contents=''; 48 srcdata = mGET(key,value,'src'); 49 50 if(/\.(swf)$/.test(srcdata)) { 51 embed_type = 1; 52 } else if(/\.(mov|avi|wma|wmv)$/.test(srcdata)) { 53 embed_type = 2; 54 } 55 56 var classid = mGET(key,value,'classid'); 57 var codebase = mGET(key,value,'codebase'); 58 59 if(embed_type==1) { 60 classid = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'; 61 codebase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0'; 62 } else if(embed_type==2) { 63 classid = 'clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95'; 64 codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715'; 65 } 66 67 if(classid && codebase) { 68 contents += '<object'; 69 if(classid) { 70 contents += ' classid="' + classid + '"'; 71 } 72 if(codebase) { 73 contents += ' codebase="' + codebase + '"'; 74 } 75 count = key.length; 76 for(i=0;i<count;i++) { 77 if(value[i]!='') { 78 if(key[i]!='src') { 79 contents += ' ' + key[i] + '="' + value[i] + '"'; 80 } 81 } 82 } 83 contents += '>'; 84 for(i=0;i<count;i++) { 85 if(value[i]!='') { 86 if(embed_type==1 && key[i]=='src') { 87 contents += '<param name="movie" value="' + value[i] + '" />'; 88 } else { 89 contents += '<param name="' + key[i] + '" value="' + value[i] + '" />'; 90 } 91 } 92 } 93 } 94 count = key.length; 95 contents += '<embed'; 96 for(i=0;i<count;i++) { 97 if(value[i]!='') { 98 contents += ' ' + key[i] + '="' + value[i] + '"'; 99 } 100 } 101 contents += '>'; 102 contents += '</embed>'; 103 if(classid && codebase) { 104 contents += '</object>'; 105 } 106 } 107 document.write(contents); 108 }
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.