1(function() { 2 try { 3 var eventMethod = window.addEventListener ? 'addEventListener' : 'attachEvent'; 4 var eventer = window[eventMethod]; 5 var messageEvent = eventMethod === 'attachEvent' ? 'onmessage' : 'message'; 6 7 window.fastEditLoaded = true; 8 9 eventer(messageEvent, function(event) { 10 var data = JSON.parse(event.data); 11 12 if ( typeof data.reload === 'string' ) { 13 document.location = data.reload; 14 } 15 16 if ( typeof data.reload === 'boolean' ) { 17 document.location.reload(); 18 } 19 20 if ( data.getUrl ) { 21 parent.postMessage(JSON.stringify({iframeLocation: document.location.href}),'*'); 22 } 23 24 if ( data.getUrlForPopupMode ) { 25 parent.postMessage(JSON.stringify({iframeLocationForPopupMode: document.location.href}),'*'); 26 } 27 28 if ( data.getUrlForPopupMainMode ) { 29 parent.postMessage(JSON.stringify({iframeLocationForPopupMainMode: document.location.href}),'*'); 30 } 31 32 if ( data.getUrlForPopupPage ) { 33 parent.postMessage(JSON.stringify({iframeLocationForPopupPage: document.location.href}),'*'); 34 } 35 36 if ( data.feedbackRun ) { 37 window.FeedbackFactory.run() 38 } 39 40 if ( data.removeTargetBlankOnLinks === true ) { 41 var targetBlankLinks = document.querySelectorAll('a[target=_blank]'); 42 43 for ( var i = 0; i < targetBlankLinks.length; i++){ 44 targetBlankLinks[i].removeAttribute('target'); 45 } 46 } 47 }); 48 49 eventer('unload', function() { 50 parent.postMessage(JSON.stringify({pageReload: true}),'*'); 51 }); 52 } catch (e) {} 53})();
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.