1function jsInclude(src, callback) 2{ 3 var head = document.getElementsByTagName('head')[0]; 4 var script = document.createElement('script'); 5 script.type = 'text/javascript'; 6 if(callback) 7 { 8 var userAgent = navigator.userAgent.toLowerCase(); 9 if(/msie/.test( userAgent ) && !/opera/.test( userAgent )) 10 { 11 script.onreadystatechange = function() 12 { 13 if(script.readyState == 'complete') 14 callback(); 15 } 16 } 17 else 18 { 19 script.onload = function () 20 { 21 callback(); 22 } 23 } 24 } 25 script.src = src; 26 head.appendChild(script); 27} 28 29_ = function(id) { 30 return document.getElementById(id); 31 } 32 33scripts = document.getElementsByTagName('script'); 34// index = scripts.length - 1; 35// myScript = scripts[index]; 36myScript = Object.values(scripts).find(function (script) { 37 return script.src.indexOf('meruert.js') > -1; 38}); 39scriptUrlParts = myScript.src.split('meruert.js'); 40scriptBaseFolder = scriptUrlParts[0]; 41 42jsInclude(scriptBaseFolder+'nicEdit.js', function(){ 43 44 bkLib.onDomLoaded(function() { 45 46 ual = navigator.userAgent.toLowerCase(); 47 if(_('part')) { 48 if(typeof NoRTE == 'undefined' && (ual.indexOf('mobi')<0 && ual.indexOf('mini')<0)) { 49 instance = new nicEditor( 50 { iconsPath : scriptBaseFolder+'nicEditorIcons.gif', 51 buttonList : ['bold','italic','underline','strikeThrough','fontSize','subscript','superscript','ol','ul','removeformat','hr','forecolor','bgcolor','link','unlink','image','xhtml'] } 52 ).panelInstance('part'); 53 } 54 } 55 if(_('preface')) { 56 if(typeof NoRTE == 'undefined' && (ual.indexOf('mobi')<0 && ual.indexOf('mini')<0)) { 57 instance = new nicEditor( 58 { iconsPath : scriptBaseFolder+'nicEditorIcons.gif', 59 buttonList : ['bold','italic','underline','strikeThrough','fontSize','subscript','superscript','ol','ul','removeformat','hr','forecolor','bgcolor','link','unlink','image','xhtml'] } 60 ).panelInstance('preface'); 61 } 62 } 63 if(_('text')) { 64 if(typeof NoRTE == 'undefined' && (ual.indexOf('mobi')<0 && ual.indexOf('mini')<0)) { 65 instance = new nicEditor( 66 { iconsPath : scriptBaseFolder+'nicEditorIcons.gif', 67 buttonList : ['bold','italic','underline','strikeThrough','fontSize','subscript','superscript','ol','ul','removeformat','hr','forecolor','bgcolor','link','unlink','image','xhtml'] } 68 ).panelInstance('text'); 69 } 70 71 document.onkeydown = function(e) { 72 keycode = (e == null) ? event.keyCode : e.which; 73 if(keycode == 0x0D && event.ctrlKey) { 74 if(_('text').parentElement.parentElement.tagName=='FORM' || _(txtid).parentElement.parentElement.tagName=='form') { 75 instance.instanceById('text').saveContent(); 76 idOfForm = _('text').parentElement.parentElement.id; 77 _(idOfForm).submit(); 78 } 79 } 80 } 81 82 } 83 84 getLinks = document.getElementsByTagName('a'); 85 for(i=0; i<getLinks.length; i++) { 86 if(getLinks[i].className.indexOf('attached_image_link')>-1) { 87 getLinks[i].onclick = function() { 88 var getImage = this.href; 89 var getParent = this.parentNode; 90 var getInnerChildren = getParent.childNodes; 91 var localImageSet = new Array(); 92 q = 0; 93 for(i in getInnerChildren) { 94 getInnerChildrenHref = new String(getInnerChildren[i].href); 95 if(getInnerChildrenHref!='undefined') { 96 localImageSet[q] = getInnerChildrenHref; 97 q++; 98 } 99 } 100 var localImageLast = localImageSet.length-1; 101 getLargeImage = getImage; 102 if(getImage.indexOf('large')>-1) { 103 getImage = getImage.replace('large/',''); 104 } 105 var body = document.getElementsByTagName('body')[0]; 106 getTop = (self.pageYOffset || (document.documentElement && document.documentElement.scrollTop) || (document.body && document.body.scrollTop)); 107 var shadowZone = document.createElement('div'); 108 shadowZone.setAttribute('style','width:100%; height:100%; position:absolute; left:0; top:'+getTop+'px; background:#000; opacity:0.99; z-index:12000;'); 109 body.appendChild(shadowZone); 110 var imgZone = document.createElement('div'); 111 imgZone.setAttribute('style','width:100%; height:100%; position:absolute; left:0; top:'+getTop+'px; background:url('+getImage+') no-repeat center center; z-index:12500;'); 112 body.appendChild(imgZone); 113 var revZone = document.createElement('div'); 114 body.appendChild(revZone); 115 var xZone = document.createElement('div'); 116 xZone.innerHTML = '×'; 117 xZone.setAttribute('style','position:absolute; right:50px; top:40px; z-index:13000; font-size:30pt; font-weight:bold; color:#fff; cursor:pointer;'); 118 imgZone.appendChild(xZone); 119 var lnkZone = document.createElement('div'); 120 getLargeImageElements = getLargeImage.split('/'); 121 lnkZone.innerHTML = '<a href="'+getLargeImage+'" target="_blank" style="color:#555; border-bottom:1px solid #333; text-decoration:none;">'+getLargeImageElements[getLargeImageElements.length-1]+'</a>'; 122 lnkZone.setAttribute('style','position:absolute; left:50px; top:55px; z-index:13000; font-size:10pt; color:#fff;'); 123 imgZone.appendChild(lnkZone); 124 document.getElementsByTagName('body')[0].style.height='100%'; 125 document.getElementsByTagName('body')[0].style.overflow='hidden';
126 if(getLargeImage!=localImageSet[0]) { 127 var leftArrowZone = document.createElement('div'); 128 leftArrowZone.innerHTML = '←'; 129 leftArrowZone.setAttribute('style','position:absolute; left:50px; top:40%; z-index:13000; font-size:24pt; font-weight:bold; color:#ccc; cursor:pointer; font-family:Monospace;'); 130 imgZone.appendChild(leftArrowZone); 131 leftArrowZone.onclick = function(e) { 132 revZone.click(); 133 e.stopPropagation(); 134 } 135 } 136 if(getLargeImage!=localImageSet[localImageLast]) { 137 var rightArrowZone = document.createElement('div'); 138 rightArrowZone.innerHTML = '→'; 139 rightArrowZone.setAttribute('style','position:absolute; right:50px; top:40%; z-index:13000; font-size:24pt; font-weight:bold; color:#ccc; cursor:pointer; font-family:Monospace;'); 140 imgZone.appendChild(rightArrowZone); 141 } 142 eraseShadowNodes = function() { 143 xZone.parentNode.removeChild(xZone); 144 lnkZone.parentNode.removeChild(lnkZone); 145 imgZone.parentNode.removeChild(imgZone); 146 revZone.parentNode.removeChild(revZone); 147 shadowZone.parentNode.removeChild(shadowZone); 148 document.getElementsByTagName('body')[0].style.height='auto'; 149 document.getElementsByTagName('body')[0].style.overflow='auto'; 150 } 151 xZone.onclick = function() { 152 eraseShadowNodes(); 153 } 154 imgZone.onclick = function() {
155 if(getLargeImage==localImageSet[localImageLast]) { 156 eraseShadowNodes(); 157 } 158 else { 159 for(find in localImageSet) { 160 if(getLargeImage==localImageSet[find]) { 161 findPlus = parseInt(find)+1; 162 eraseShadowNodes(); 163 for(j in getInnerChildren) { 164 getInnerChildHref = new String(getInnerChildren[j].href); 165 if(getInnerChildHref.toString()==localImageSet[findPlus].toString()) { 166 getInnerChildren[j].click(); 167 break; 168 } 169 } 170 break; 171 } 172 else continue; 173 } 174 } 175 } 176 revZone.onclick = function() { 177 if(getLargeImage!=localImageSet[0]) { 178 for(find in localImageSet) { 179 if(getLargeImage==localImageSet[find]) { 180 findPlus = parseInt(find)-1; 181 eraseShadowNodes(); 182 for(j in getInnerChildren) { 183 getInnerChildHref = new String(getInnerChildren[j].href); 184 if(getInnerChildHref.toString()==localImageSet[findPlus].toString()) { 185 getInnerChildren[j].click(); 186 break; 187 } 188 } 189 break; 190 } 191 else continue; 192 } 193 } 194 } 195 document.onkeydown = function(e) { 196 keycode = (e == null) ? event.keyCode : e.which; 197 if(keycode == 27) { 198 eraseShadowNodes(); 199 } 200 else if(keycode == 39 || keycode == 40) { 201 imgZone.click(); 202 } 203 else if(keycode == 37 || keycode == 38) { 204 revZone.click(); 205 } 206 } 207 208 209 return false; 210 } 211 } 212 } 213 214 }); 215 216 }); 217
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.