diff --git a/embeddedXMLViewer.js b/embeddedXMLViewer.js new file mode 100644 index 0000000..5bac064 --- /dev/null +++ b/embeddedXMLViewer.js @@ -0,0 +1,67 @@ +var iibpd = { + + simulateClick: function(elem) { + var evt = document.createEvent("MouseEvents"); + evt.initMouseEvent( + "click", /* type */ + true, /* canBubble */ + true, /* cancelable */ + window, /* view */ + 0, /* detail */ + 0, /* screenX */ + 0, /* screenY */ + 0, /* clientX */ + 0, /* clientY */ + false, /* ctrlKey */ + false, /* altKey */ + false, /* shiftKey */ + false, /* metaKey */ + 0, /* button */ + null); /* relatedTarget */ + elem.dispatchEvent(evt); + return check = true; + }, + + processKey: function(e) { //e is event object passed from function invocation + var kc //literal character code will be stored in this variable + + e = (e) ? e : ((window.event) ? window.event : ""); + kc = e.keyCode?e.keyCode:e.which; + sk = e.shiftKey?e.shiftKey:((kc == 16)?true:false); + + if (kc == 83 || kc == 13 || kc == 39) { + // 83:S, 13:enter, 39:right arrow + if (e.shiftKey) { + var btnStep = document.querySelectorAll("input[value='Step Over']"); + } else { + var btnStep = document.querySelectorAll("input[value=Step]"); + } + if (!!btnStep && btnStep[0]) { + iibpd.simulateClick(btnStep[0]); + } + } else if (kc == 82) { + // R + var btnRun = document.querySelectorAll("input[value=Run]"); + if (!!btnRun && btnRun[0]) iibpd.simulateClick(btnRun[0]); + } + }, + + init: function() { + var arrEl = document.getElementsByTagName('pre'); + for(var i=0; i < arrEl.length; i++) { + var element = arrEl[i]; + LoadXMLString(element, Encoder.htmlDecode(element.innerHTML)); + } + + document.addEventListener("keydown", iibpd.processKey, true); + }, + + load: function () { + document.addEventListener("readystatechange", function() { + if (document.readyState == "complete") { + iibpd.init(); + } + }, true) + } +} +iibpd.load(); diff --git a/encoder.js b/encoder.js new file mode 100644 index 0000000..883f4f6 --- /dev/null +++ b/encoder.js @@ -0,0 +1,243 @@ +/** + * A Javascript object to encode and/or decode html characters using HTML or Numeric entities that handles double or partial encoding + * Author: R Reid + * source: http://www.strictly-software.com/htmlencode + * Licences: GPL, The MIT License (MIT) + * Copyright: (c) 2011 Robert Reid - Strictly-Software.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Revision: + * 2011-07-14, Jacques-Yves Bleau: + * - fixed conversion error with capitalized accentuated characters + * + converted arr1 and arr2 to object property to remove redundancy + * + * Revision: + * 2011-11-10, Ce-Yi Hio: + * - fixed conversion error with a number of capitalized entity characters + * + * Revision: + * 2011-11-10, Rob Reid: + * - changed array format + * + * Revision: + * 2012-09-23, Alex Oss: + * - replaced string concatonation in numEncode with string builder, push and join for peformance with ammendments by Rob Reid + */ + +Encoder = { + + // When encoding do we convert characters into html or numerical entities + EncodeType : "entity", // entity OR numerical + + isEmpty : function(val){ + if(val){ + return ((val===null) || val.length==0 || /^\s+$/.test(val)); + }else{ + return true; + } + }, + + // arrays for conversion from HTML Entities to Numerical values + arr1: [' ','¡','¢','£','¤','¥','¦','§','¨','©','ª','«','¬','­','®','¯','°','±','²','³','´','µ','¶','·','¸','¹','º','»','¼','½','¾','¿','À','Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö','×','Ø','Ù','Ú','Û','Ü','Ý','Þ','ß','à','á','â','ã','ä','å','æ','ç','è','é','ê','ë','ì','í','î','ï','ð','ñ','ò','ó','ô','õ','ö','÷','ø','ù','ú','û','ü','ý','þ','ÿ','"','&','<','>','Œ','œ','Š','š','Ÿ','ˆ','˜',' ',' ',' ','‌','‍','‎','‏','–','—','‘','’','‚','“','”','„','†','‡','‰','‹','›','€','ƒ','Α','Β','Γ','Δ','Ε','Ζ','Η','Θ','Ι','Κ','Λ','Μ','Ν','Ξ','Ο','Π','Ρ','Σ','Τ','Υ','Φ','Χ','Ψ','Ω','α','β','γ','δ','ε','ζ','η','θ','ι','κ','λ','μ','ν','ξ','ο','π','ρ','ς','σ','τ','υ','φ','χ','ψ','ω','ϑ','ϒ','ϖ','•','…','′','″','‾','⁄','℘','ℑ','ℜ','™','ℵ','←','↑','→','↓','↔','↵','⇐','⇑','⇒','⇓','⇔','∀','∂','∃','∅','∇','∈','∉','∋','∏','∑','−','∗','√','∝','∞','∠','∧','∨','∩','∪','∫','∴','∼','≅','≈','≠','≡','≤','≥','⊂','⊃','⊄','⊆','⊇','⊕','⊗','⊥','⋅','⌈','⌉','⌊','⌋','⟨','⟩','◊','♠','♣','♥','♦'], + arr2: [' ','¡','¢','£','¤','¥','¦','§','¨','©','ª','«','¬','­','®','¯','°','±','²','³','´','µ','¶','·','¸','¹','º','»','¼','½','¾','¿','À','Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö','×','Ø','Ù','Ú','Û','Ü','Ý','Þ','ß','à','á','â','ã','ä','å','æ','ç','è','é','ê','ë','ì','í','î','ï','ð','ñ','ò','ó','ô','õ','ö','÷','ø','ù','ú','û','ü','ý','þ','ÿ','"','&','<','>','Œ','œ','Š','š','Ÿ','ˆ','˜',' ',' ',' ','‌','‍','‎','‏','–','—','‘','’','‚','“','”','„','†','‡','‰','‹','›','€','ƒ','Α','Β','Γ','Δ','Ε','Ζ','Η','Θ','Ι','Κ','Λ','Μ','Ν','Ξ','Ο','Π','Ρ','Σ','Τ','Υ','Φ','Χ','Ψ','Ω','α','β','γ','δ','ε','ζ','η','θ','ι','κ','λ','μ','ν','ξ','ο','π','ρ','ς','σ','τ','υ','φ','χ','ψ','ω','ϑ','ϒ','ϖ','•','…','′','″','‾','⁄','℘','ℑ','ℜ','™','ℵ','←','↑','→','↓','↔','↵','⇐','⇑','⇒','⇓','⇔','∀','∂','∃','∅','∇','∈','∉','∋','∏','∑','−','∗','√','∝','∞','∠','∧','∨','∩','∪','∫','∴','∼','≅','≈','≠','≡','≤','≥','⊂','⊃','⊄','⊆','⊇','⊕','⊗','⊥','⋅','⌈','⌉','⌊','⌋','〈','〉','◊','♠','♣','♥','♦'], + + // Convert HTML entities into numerical entities + HTML2Numerical : function(s){ + return this.swapArrayVals(s,this.arr1,this.arr2); + }, + + // Convert Numerical entities into HTML entities + NumericalToHTML : function(s){ + return this.swapArrayVals(s,this.arr2,this.arr1); + }, + + + // Numerically encodes all unicode characters + numEncode : function(s){ + if(this.isEmpty(s)) return ""; + + var a = [], + l = s.length; + + for (var i=0;i "~"){ + a.push("&#"); + a.push(c.charCodeAt()); //numeric value of code point + a.push(";"); + }else{ + a.push(c); + } + } + + return a.join(""); + }, + + // HTML Decode numerical and HTML entities back to original values + htmlDecode : function(s){ + + var c,m,d = s; + + if(this.isEmpty(d)) return ""; + + // convert HTML entites back to numerical entites first + d = this.HTML2Numerical(d); + + // look for numerical entities " + arr=d.match(/&#[0-9]{1,5};/g); + + // if no matches found in string then skip + if(arr!=null){ + for(var x=0;x= -32768 && c <= 65535){ + // decode every single match within string + d = d.replace(m, String.fromCharCode(c)); + }else{ + d = d.replace(m, ""); //invalid so replace with nada + } + } + } + + return d; + }, + + // encode an input string into either numerical or HTML entities + htmlEncode : function(s,dbl){ + + if(this.isEmpty(s)) return ""; + + // do we allow double encoding? E.g will & be turned into &amp; + dbl = dbl || false; //default to prevent double encoding + + // if allowing double encoding we do ampersands first + if(dbl){ + if(this.EncodeType=="numerical"){ + s = s.replace(/&/g, "&"); + }else{ + s = s.replace(/&/g, "&"); + } + } + + // convert the xss chars to numerical entities ' " < > + s = this.XSSEncode(s,false); + + if(this.EncodeType=="numerical" || !dbl){ + // Now call function that will convert any HTML entities to numerical codes + s = this.HTML2Numerical(s); + } + + // Now encode all chars above 127 e.g unicode + s = this.numEncode(s); + + // now we know anything that needs to be encoded has been converted to numerical entities we + // can encode any ampersands & that are not part of encoded entities + // to handle the fact that I need to do a negative check and handle multiple ampersands &&& + // I am going to use a placeholder + + // if we don't want double encoded entities we ignore the & in existing entities + if(!dbl){ + s = s.replace(/&#/g,"##AMPHASH##"); + + if(this.EncodeType=="numerical"){ + s = s.replace(/&/g, "&"); + }else{ + s = s.replace(/&/g, "&"); + } + + s = s.replace(/##AMPHASH##/g,"&#"); + } + + // replace any malformed entities + s = s.replace(/&#\d*([^\d;]|$)/g, "$1"); + + if(!dbl){ + // safety check to correct any double encoded & + s = this.correctEncoding(s); + } + + // now do we need to convert our numerical encoded string into entities + if(this.EncodeType=="entity"){ + s = this.NumericalToHTML(s); + } + + return s; + }, + + // Encodes the basic 4 characters used to malform HTML in XSS hacks + XSSEncode : function(s,en){ + if(!this.isEmpty(s)){ + en = en || true; + // do we convert to numerical or html entity? + if(en){ + s = s.replace(/\'/g,"'"); //no HTML equivalent as &apos is not cross browser supported + s = s.replace(/\"/g,"""); + s = s.replace(//g,">"); + }else{ + s = s.replace(/\'/g,"'"); //no HTML equivalent as &apos is not cross browser supported + s = s.replace(/\"/g,"""); + s = s.replace(//g,">"); + } + return s; + }else{ + return ""; + } + }, + + // returns true if a string contains html or numerical encoded entities + hasEncoded : function(s){ + if(/&#[0-9]{1,5};/g.test(s)){ + return true; + }else if(/&[A-Z]{2,6};/gi.test(s)){ + return true; + }else{ + return false; + } + }, + + // will remove any unicode characters + stripUnicode : function(s){ + return s.replace(/[^\x20-\x7E]/g,""); + + }, + + // corrects any double encoded & entities e.g &amp; + correctEncoding : function(s){ + return s.replace(/(&)(amp;)+/,"$1"); + }, + + + // Function to loop through an array swaping each item with the value from another array e.g swap HTML entities with Numericals + swapArrayVals : function(s,arr1,arr2){ + if(this.isEmpty(s)) return ""; + var re; + if(arr1 && arr2){ + //ShowDebug("in swapArrayVals arr1.length = " + arr1.length + " arr2.length = " + arr2.length) + // array lengths must match + if(arr1.length == arr2.length){ + for(var x=0,i=arr1.length;x. All rights reserved. + * You may copy and modify this script as long as the above copyright notice, + * this condition and the following disclaimer is left intact. + * This software is provided by the author "AS IS" and no warranties are + * implied, including fitness for a particular purpose. In no event shall + * the author be liable for any damages arising in any way out of the use + * of this software, even if advised of the possibility of such damage. + * $Date: 2007-10-03 19:08:15 -0700 (Wed, 03 Oct 2007) $ + */ + +/* Modified by Paul Blackman, July 2014, + * for use in IBM BPM Debug pages. + */ + +function LoadXML(ParentElementID, URL) { + var xmlHolderElement = GetParentElement(ParentElementID); + if (xmlHolderElement == null) { + return false; + } + ToggleElementVisibility(xmlHolderElement); + return RequestURL(URL, URLReceiveCallback, ParentElementID); +} +function LoadXMLDom(ParentElementID, xmlDoc) { + if (xmlDoc) { + var xmlHolderElement = GetParentElement(ParentElementID); + if (xmlHolderElement == null) { + return false; + } + while (xmlHolderElement.childNodes.length) { + xmlHolderElement.removeChild(xmlHolderElement.childNodes.item(xmlHolderElement.childNodes.length - 1)); + } + var Result = ShowXML(xmlHolderElement, xmlDoc.documentElement, 0); + + var ReferenceElement = document.createElement('div'); +//TODO - place source links in configuration page. + // var Link = document.createElement('a'); + // Link.setAttribute('href','http://www.levmuchnik.net/Content/ProgrammingTips/WEB/XMLDisplay/DisplayXMLFileWithJavascript.html'); + // var TextNode = document.createTextNode('Source: Lev Muchnik'); + // Link.appendChild(TextNode); + // xmlHolderElement.appendChild(Link); + return Result; + } else { + return false; + } +} +function LoadXMLString(ParentElementID, XMLString) { + xmlDoc = CreateXMLDOM(XMLString); + if ( !! xmlDoc && !!xmlDoc.body && !!xmlDoc.body.childNodes && !!xmlDoc.body.childNodes[0] && xmlDoc.body.childNodes[0].nodeName === "parsererror") { + return false; + } else { + return LoadXMLDom(ParentElementID, xmlDoc); + } +} +//////////////////////////////////////////////////////////// +// HELPER FUNCTIONS - SHOULD NOT BE DIRECTLY CALLED BY USERS +//////////////////////////////////////////////////////////// +function GetParentElement(ParentElementID) { + if (typeof(ParentElementID) == 'string') { + return document.getElementById(ParentElementID); + } else if (typeof(ParentElementID) == 'object') { + return ParentElementID; + } else { + return null; + } +} +function URLReceiveCallback(httpRequest, xmlHolderElement) { + try { + if (httpRequest.readyState == 4) { + if (httpRequest.status == 200) { + var xmlDoc = httpRequest.responseXML; + if (xmlHolderElement && xmlHolderElement != null) { + xmlHolderElement.innerHTML = ''; + return LoadXMLDom(xmlHolderElement, xmlDoc); + } + } else { + return false; + } + } + } catch(e) { + return false; + } +} +function RequestURL(url, callback, ExtraData) { + // based on: http://developer.mozilla.org/en/docs/AJAX:Getting_Started + var httpRequest; + if (window.XMLHttpRequest) { + // Mozilla, Safari, ... + httpRequest = new XMLHttpRequest(); + if (httpRequest.overrideMimeType) { + httpRequest.overrideMimeType('text/xml'); + } + } else if (window.ActiveXObject) { + // IE + try { + httpRequest = new ActiveXObject("Msxml2.XMLHTTP"); + } catch(e) { + try { + httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); + } catch(e) {} + } + } + if (!httpRequest) { + return false; + } + httpRequest.onreadystatechange = function() { + callback(httpRequest, ExtraData); + }; + httpRequest.open('GET', url, true); + httpRequest.send(''); + return true; +} +function CreateXMLDOM(XMLStr) { + if (window.ActiveXObject) { + xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); + xmlDoc.loadXML(XMLStr); + return xmlDoc; + } else if (document.implementation && document.implementation.createDocument) { + var parser = new DOMParser(); + return parser.parseFromString(XMLStr, "text/xml"); + } else { + return null; + }Ad +} + +var IDCounter = 1; +var NestingIndent = 15; +function ShowXML(xmlHolderElement, RootNode, indent) { + if (RootNode == null || xmlHolderElement == null) { + return false; + } + var Result = true; + var TagEmptyElement = document.createElement('div'); + TagEmptyElement.className = 'Element'; + + if (indent != 0) { + TagEmptyElement.style.left = NestingIndent + 'px'; + } + if (RootNode.childNodes.length == 0) { + var ClickableElement = AddTextNode(TagEmptyElement, ' ', 'Clickable'); //no action on this Clickable + AddTextNode(TagEmptyElement, '<', 'Utility'); + AddTextNode(TagEmptyElement, RootNode.nodeName, 'NodeName') + for (var i = 0; RootNode.attributes && i < RootNode.attributes.length;++i) { + CurrentAttribute = RootNode.attributes.item(i); + AddTextNode(TagEmptyElement, ' ' + CurrentAttribute.nodeName, 'AttributeName'); + AddTextNode(TagEmptyElement, '=', 'Utility'); + AddTextNode(TagEmptyElement, '"' + CurrentAttribute.nodeValue + '"', 'AttributeValue'); + } + AddTextNode(TagEmptyElement, ' />'); + xmlHolderElement.appendChild(TagEmptyElement); + + } else { // mo child nodes + + // build collapsed display elements + + //Look for text content and display in single line + var NodeContent = null; + for (var i = 0; RootNode.childNodes && i < RootNode.childNodes.length; ++i) { + if (RootNode.childNodes.item(i).nodeName === '#text') { + NodeContent = RootNode.childNodes.item(i).nodeValue; + } + } + var bSimpleContentExists = ( !!NodeContent && !!(NodeContent.trim())); + + if (bSimpleContentExists) { + // no expand button + var ClickableElement = AddTextNode(TagEmptyElement, ' ', 'Clickable'); //no action on this Clickable + } else { + // expand button + var ClickableElement = AddTextNode(TagEmptyElement, '+', 'Clickable'); + ClickableElement.onclick = function(e) { + ToggleElementVisibility(this, e.ctrlKey); + } + ClickableElement.id = 'div_empty_' + IDCounter; + } + // element + AddTextNode(TagEmptyElement, '<', 'Utility'); + AddTextNode(TagEmptyElement, RootNode.nodeName, 'NodeName') + // element attributes + for (var i = 0; RootNode.attributes && i < RootNode.attributes.length;++i) { + CurrentAttribute = RootNode.attributes.item(i); + AddTextNode(TagEmptyElement, ' ' + CurrentAttribute.nodeName, 'AttributeName'); + AddTextNode(TagEmptyElement, '=', 'Utility'); + AddTextNode(TagEmptyElement, '"' + CurrentAttribute.nodeValue + '"', 'AttributeValue'); + } + AddTextNode(TagEmptyElement, '>', 'Utility'); + +// if ( !!RootNode.nodeValue ) { NodeContent = RootNode.nodeValue; console.log(NodeContent); } //needed? + if (bSimpleContentExists) { //display inline simple content + var ContentElement = document.createElement('span'); + AddTextNode(ContentElement, NodeContent, 'NodeValue'); + TagEmptyElement.appendChild(ContentElement); + } + + AddTextNode(TagEmptyElement, '', 'Utility'); + xmlHolderElement.appendChild(TagEmptyElement); + SetVisibility(TagEmptyElement, true); // collapsed by default + + //---------------------------------------------- + if (!bSimpleContentExists) { + // build uncollapsed display elements + var TagElement = document.createElement('div'); + TagElement.className = 'Element'; + + if (indent != 0) { + TagElement.style.left = NestingIndent + 'px'; + } + ClickableElement = AddTextNode(TagElement, '-', 'Clickable'); + ClickableElement.onclick = function(e) { + ToggleElementVisibility(this, e.ctrlKey); + } + ClickableElement.id = 'div_content_' + IDCounter; ++IDCounter; + AddTextNode(TagElement, '<', 'Utility'); + AddTextNode(TagElement, RootNode.nodeName, 'NodeName'); + + for (var i = 0; RootNode.attributes && i < RootNode.attributes.length;++i) { + CurrentAttribute = RootNode.attributes.item(i); + AddTextNode(TagElement, ' ' + CurrentAttribute.nodeName, 'AttributeName'); + AddTextNode(TagElement, '=', 'Utility'); + AddTextNode(TagElement, '"' + CurrentAttribute.nodeValue + '"', 'AttributeValue'); + } + AddTextNode(TagElement, '>', 'Utility'); + TagElement.appendChild(document.createElement('br')); + var NodeContent = null; + for (var i = 0; RootNode.childNodes && i < RootNode.childNodes.length; ++i) { + if (RootNode.childNodes.item(i).nodeName != '#text') { + Result &= ShowXML(TagElement, RootNode.childNodes.item(i), indent + 1); + } + } + + AddTextNode(TagElement, ' ', 'Clickable'); + AddTextNode(TagElement, '', 'Utility'); + xmlHolderElement.appendChild(TagElement); + SetVisibility(TagElement, false); // collapsed by default + } + } + + return Result; +} +function AddTextNode(ParentNode, Text, Class) { + NewNode = document.createElement('span'); + if (Class) { + NewNode.className = Class; + } + if (Text) { + NewNode.appendChild(document.createTextNode(Text)); + } + if (ParentNode) { + ParentNode.appendChild(NewNode); + } + return NewNode; +} +function CompatibleGetElementByID(id) { + if (!id) { + return null; + } + if (document.getElementById) { + // DOM3 = IE5, NS6 + return document.getElementById(id); + } else { + if (document.layers) { + // Netscape 4 + return document.id; + } else { + // IE 4 + return document.all.id; + } + } +} +function SetVisibility(HTMLElement, Visible) { + if (!HTMLElement) { + return; + } + var VisibilityStr = (Visible) ? 'block': 'none'; + if (document.getElementById) { + // DOM3 = IE5, NS6 + HTMLElement.style.display = VisibilityStr; + } else { + if (document.layers) { + // Netscape 4 + HTMLElement.display = VisibilityStr; + } else { + // IE 4 + HTMLElement.id.style.display = VisibilityStr; + } + } +} +function ToggleElementVisibility(Element, bCTRLKey) { + if (bCTRLKey) { + //TODO + console.log('Trigger nested collapse/expand not yet implemented'); + } + if (!Element || !Element.id) { + return; + } + try { + ElementType = Element.id.slice(0, Element.id.lastIndexOf('_') + 1); + ElementID = parseInt(Element.id.slice(Element.id.lastIndexOf('_') + 1)); + } catch(e) { + return; + } + var ElementToHide = null; + var ElementToShow = null; + if (ElementType == 'div_content_') { + ElementToHide = 'div_content_' + ElementID; + ElementToShow = 'div_empty_' + ElementID; + } else if (ElementType == 'div_empty_') { + ElementToShow = 'div_content_' + ElementID; + ElementToHide = 'div_empty_' + ElementID; + } + ElementToHide = CompatibleGetElementByID(ElementToHide); + ElementToShow = CompatibleGetElementByID(ElementToShow); + if (ElementToHide) { + ElementToHide = ElementToHide.parentNode; + } + if (ElementToShow) { + ElementToShow = ElementToShow.parentNode; + } + SetVisibility(ElementToHide, false); + SetVisibility(ElementToShow, true); +} diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..e7b6f83 --- /dev/null +++ b/manifest.json @@ -0,0 +1,24 @@ +{ + "manifest_version": 2, + "author": "Paul Blackman", + "content_scripts": [ { + "exclude_globs": [ ], + "include_globs": [ "*" ], + "css": [ "loadxml.css" ], + "js": [ "injector.js" ], + "matches": [ "file://*/*", + "http://*/*", + "https://*/*" + ], + "run_at": "document_end" + } ], + "web_accessible_resources": [ + "encoder.js", + "loadxml.js", + "embeddedXMLViewer.js" + ], + "converted_from_user_script": true, + "description": "Convert HTML encoded XML in 'pre' elements to a colourised, collapsible view. Intended for use with IBM BPM Debug output. Also adds hotkeys for 'Step Over' (SHIFT-S), 'Step' (S, Enter, or Right Arrow), and 'Run' (R). Based on Lev Muchnik's LoadXML, and using Robert Reid's htmlEncode.", + "name": "Embedded XML Viewer", + "version": "1.0" +}