@gregoriusrippenstein/node-red-contrib-introspection 0.6.7 → 0.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -287,5 +287,5 @@
287
287
  </script>
288
288
 
289
289
  <script type="text/html" data-help-name="Seeker">
290
- <p>Ther Seeker seeks in the sink and presents all (max 25) paths that lead to the sink.</p>
290
+ <p>The Seeker seeks in the sink and presents all (max 25) paths that lead to the sink.</p>
291
291
  </script>
@@ -79,7 +79,7 @@ module.exports = function(RED) {
79
79
  if (req.body ) {
80
80
  req.body.nodes.forEach( n => {
81
81
 
82
- if ( n.format == "css") {
82
+ if (n.format == "css" && !/[@]obfuscate-ignore/.test(n.template) ) {
83
83
  let output = new CleanCSS(req.body.csscfg).minify(n.template);
84
84
  if ( output.styles && (output.errors || []).length == 0 ) {
85
85
  n.template = output.styles
@@ -89,7 +89,7 @@ module.exports = function(RED) {
89
89
  }
90
90
  }
91
91
 
92
- if (n.format == "json") {
92
+ if (n.format == "json" && !/[@]obfuscate-ignore/.test(n.template)) {
93
93
  let result = {}
94
94
  try {
95
95
  result.code = JSON.stringify(JSON.parse(n.template))
@@ -105,7 +105,7 @@ module.exports = function(RED) {
105
105
  }
106
106
  }
107
107
 
108
- if ( n.format == "javascript") {
108
+ if (n.format == "javascript" && !/[@]obfuscate-ignore/.test(n.template)) {
109
109
  /* this handles PkgFile nodes and template nodes */
110
110
  let result = UglifyJS.minify(n.template, req.body.jscfg)
111
111
 
@@ -117,7 +117,7 @@ module.exports = function(RED) {
117
117
  }
118
118
  }
119
119
 
120
- if (n.type == "function") {
120
+ if (n.type == "function" && !/[@]obfuscate-ignore/.test(n.func)) {
121
121
  let result = UglifyJS.minify(n.func, req.body.jscfg)
122
122
 
123
123
  if (result.code && !result.error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gregoriusrippenstein/node-red-contrib-introspection",
3
- "version": "0.6.7",
3
+ "version": "0.6.9",
4
4
  "dependencies": {
5
5
  "got": "^13",
6
6
  "uglify-js": "^3.17.4",
@@ -2,7 +2,7 @@
2
2
  (function() {
3
3
  var globalRefToSvgData;
4
4
 
5
- let obfuscateHelpers={getFlowDataFromCurrentWorkspace:e=>{var e=e||RED.workspaces.active(),r=RED.nodes.groups(e),e=(r=(r=r.concat(RED.nodes.junctions(e))).concat(RED.nodes.filterNodes({z:e})),RED.nodes.eachConfig(function(e){e.z===RED.workspaces.active()&&!1===e._def.hasUsers&&r.push(e)}),RED.nodes.workspace(e)||RED.nodes.subflow(e));return r.unshift(e),RED.nodes.createExportableNodeSet(r)},openImportDialog:e=>{RED.clipboard.import();let r=e;setTimeout(()=>{$("#red-ui-clipboard-dialog-import-text").val(JSON.stringify(r)).trigger("paste")},300)}};function obfuscatieCurrentFlow(r){let c=obfuscateHelpers.getFlowDataFromCurrentWorkspace(),l=(r.remove_groups&&(c=c.filter(e=>"group"!=e.type)).forEach(e=>{delete e.g}),{}),o={},p={},u={},i=[],d={},s={};if(c.forEach(e=>{"subflow"==(l[e.id]=e).type&&(s[e.id]=e),"junction"==e.type&&(o[e.id]=e),"link out"==e.type&&(u[e.id]=e),"link in"==e.type&&(p[e.id]=e),"link call"==e.type&&i.push(e.id),"catch"==e.type&&(d[e.id]=(e.wires||[])[0]||[])}),r.remove_junctions&&(Object.keys(o).forEach(t=>{let i=o[t];s[i.z]||c.forEach(r=>{for(let e=0;e<(r.wires||[]).length;e++){var o=r.wires[e].indexOf(t);-1<o&&(r.wires[e].splice(o,1),r.wires[e].push(...i.wires[0]))}})}),c=c.filter(e=>!("junction"==e.type&&!s[e.z]))),r.remove_linkout_nodes||r.remove_linkcall_nodes){let t=[],o=[],n=[],a=(r.remove_linkout_nodes&&!r.copy_linkin_nodes&&Object.keys(u).forEach(i=>{var e=u[i],r=e.links||[];r.reduce((e,r)=>e&&!!p[r],!0)&&"return"!=e.mode&&(t.push(i),r.forEach(t=>{c.forEach(r=>{for(let e=0;e<(r.wires||[]).length;e++){var o=r.wires[e].indexOf(i);-1<o&&(r.wires[e].splice(o,1),r.wires[e].push(...p[t].wires[0]))}})}))}),(i,e)=>{if(!e)return!1;let r=[],s=[],o=[];function n(e){if(o.indexOf(e.id)<0)if(o.push(e.id),r.push(e),"link out"===e.type){if("return"!=e.mode)throw"not handable"}else RED.nodes.getNodeLinks(e).forEach(function(e){n(e.target)})}try{RED.nodes.getNodeLinks(e).forEach(function(e){n(e.target),s.push(e.target.id)});if(Object.keys(d).forEach(e=>{((r,e)=>{try{return e.map(e=>e.id).forEach(e=>{if(r.includes(e))throw"yes"}),!1}catch(e){return!0}})(d[e],r)&&r.push(l[e])}),0==r.length)return!1;let o={};var a=r[0];let t={x:i.x-a.x,y:i.y-a.y};var c=r.map(e=>{var r=structuredClone(l[e.id]);return r||console.log("WARNING: nodeid not found",[e.id,l[e.id]]),r.id=RED.nodes.id(),r.x+=t.x,r.y+=t.y,o[e.id]=r});return c.forEach(e=>{"catch"==e.type&&Array.isArray(e.scope)&&(e.scope=e.scope.map(e=>{var r=o[e];return r&&r.id||e})),e.wires&&(e.wires=e.wires.map(e=>e.map(e=>{var r=o[e];return r&&"link out"==r.type?[...i.wires[0],(r||{}).id||e]:(r||{}).id||e}).flat()))}),{nodes:c.filter(e=>"link out"!=e.type),entryNodes:s.map(e=>o[e])}}catch(e){return console.log(e),!1}});r.remove_linkout_nodes&&r.copy_linkin_nodes&&Object.keys(u).forEach(s=>{let o=u[s];var e=o.links||[];"return"!=o.mode&&(e=e.map(e=>{var r=p[e],r=a(o,r);if(r)return[e,r]})).reduce((e,r)=>e&&!!r,!0)&&(t.push(s),e.forEach(([,i])=>{c.forEach(r=>{for(let e=0;e<(r.wires||[]).length;e++){var o,t=r.wires[e].indexOf(s);-1<t&&(o=i.entryNodes.map(e=>e.id),r.wires[e].splice(t,1),r.wires[e].push(...o),n.push(...i.nodes))}})}))}),r.remove_linkcall_nodes&&i.forEach(i=>{var e=l[i],r=p[e.links[0]];let s=a(e,r);r&&s&&(o.push(e.id),c.forEach(r=>{for(let e=0;e<(r.wires||[]).length;e++){var o,t=r.wires[e].indexOf(i);-1<t&&(o=s.entryNodes.map(e=>e.id),r.wires[e].splice(t,1),r.wires[e].push(...o),n.push(...s.nodes))}}))}),(c=c.filter(e=>t.indexOf(e.id)<0&&o.indexOf(e.id)<0)).push(...n)}if((c=r.remove_debugs?c.filter(e=>"debug"!=e.type):c).forEach(e=>{r.name&&(e.name=e.id),r.info&&(e.info="",delete e.outputLabels,delete e.inputLabels),r.position&&(e.x=150,e.y=150),r.remove_icons&&delete e.icon}),r.javascript){let o={},r=[];c.forEach(e=>{"javascript"!=(o[e.id]=e).format&&"function"!=e.type&&"css"!=e.format&&"json"!=e.format||r.push(e)});var e={parse:{bare_returns:!0,expression:!1},compress:{},mangle:{reserved:["$","export","require"]},output:null,sourceMap:null,nameCache:null,toplevel:!1,warnings:!1},t={compatibility:"*",level:2};$.ajax({url:"ClientCode/"+RED.nodes.id()+"/ugify",type:"POST",contentType:"application/json; charset=utf-8",data:JSON.stringify({nodes:r,jscfg:e,csscfg:t}),success:function(e){e.forEach(e=>{var r=o[e.id];e._error&&console.log("ERROR NODE",e),"function"==r.type?r.func=e.func:"javascript"!=r.format&&"css"!=r.format&&"json"!=r.format||(r.template=e.template)}),obfuscateHelpers.openImportDialog(c)},error:function(e,r,o){RED.notify("ClientCode Communcation Failure: "+n.id+": "+r,{type:"error",timeout:3e3})}})}else obfuscateHelpers.openImportDialog(c)}
5
+ let obfuscateHelpers={getFlowDataFromCurrentWorkspace:e=>{var e=e||RED.workspaces.active(),t=RED.nodes.groups(e),e=(t=(t=t.concat(RED.nodes.junctions(e))).concat(RED.nodes.filterNodes({z:e})),RED.nodes.eachConfig(function(e){e.z===RED.workspaces.active()&&!1===e._def.hasUsers&&t.push(e)}),RED.nodes.workspace(e)||RED.nodes.subflow(e));return t.unshift(e),RED.nodes.createExportableNodeSet(t)},openImportDialog:e=>{RED.clipboard.import();let t=e;setTimeout(()=>{$("#red-ui-clipboard-dialog-import-text").val(JSON.stringify(t)).trigger("paste")},300)}};function obfuscatieCurrentFlow(t){let i=obfuscateHelpers.getFlowDataFromCurrentWorkspace(),l=(t.remove_groups&&(i=i.filter(e=>"group"!=e.type)).forEach(e=>{delete e.g}),{}),r={},p={},f={},o=[],d={},u={};if(i.forEach(e=>{"subflow"==(l[e.id]=e).type&&(u[e.id]=e),"junction"==e.type&&(r[e.id]=e),"link out"==e.type&&(f[e.id]=e),"link in"==e.type&&(p[e.id]=e),"link call"==e.type&&o.push(e.id),"catch"==e.type&&(d[e.id]=(e.wires||[])[0]||[])}),t.remove_junctions&&(Object.keys(r).forEach(s=>{let n=r[s];u[n.z]||i.forEach(t=>{for(let e=0;e<(t.wires||[]).length;e++){var r=t.wires[e].indexOf(s);-1<r&&(t.wires[e].splice(r,1),t.wires[e].push(...n.wires[0]))}})}),i=i.filter(e=>!("junction"==e.type&&!u[e.z]))),t.remove_linkout_nodes||t.remove_linkcall_nodes){let s=[],r=[],u=[],a=(t.remove_linkout_nodes&&!t.copy_linkin_nodes&&Object.keys(f).forEach(n=>{var e=f[n],t=e.links||[];t.reduce((e,t)=>e&&!!p[t],!0)&&"return"!=e.mode&&(s.push(n),t.forEach(s=>{i.forEach(t=>{for(let e=0;e<(t.wires||[]).length;e++){var r=t.wires[e].indexOf(n);-1<r&&(t.wires[e].splice(r,1),t.wires[e].push(...p[s].wires[0]))}})}))}),(n,e)=>{if(!e)return!1;let t=[],o=[],r=[];function u(e){if(r.indexOf(e.id)<0)switch(r.push(e.id),t.push(e),e.type){case"link out":if("return"!=e.mode)throw"not handable";break;case"link call":throw"unhandled";default:RED.nodes.getNodeLinks(e).forEach(function(e){u(e.target)})}}try{RED.nodes.getNodeLinks(e).forEach(function(e){u(e.target),o.push(e.target.id)});if(Object.keys(d).forEach(e=>{((t,e)=>{try{return e.map(e=>e.id).forEach(e=>{if(t.includes(e))throw"yes"}),!1}catch(e){return!0}})(d[e],t)&&t.push(l[e])}),0==t.length)return!1;let r={};var a=t[0];let s={x:n.x-a.x,y:n.y-a.y};var i=t.map(e=>{var t=structuredClone(l[e.id]);return t||console.log("WARNING: nodeid not found",[e.id,l[e.id]]),t.id=RED.nodes.id(),t.x+=s.x,t.y+=s.y,r[e.id]=t});return i.forEach(e=>{"catch"==e.type&&Array.isArray(e.scope)&&(e.scope=e.scope.map(e=>{var t=r[e];return t&&t.id||e})),e.wires&&(e.wires=e.wires.map(e=>e.map(e=>{var t=r[e];return t&&"link out"==t.type?[...n.wires[0],(t||{}).id||e]:(t||{}).id||e}).flat()))}),{nodes:i.filter(e=>"link out"!=e.type),entryNodes:o.map(e=>r[e])}}catch(e){return!1}});t.remove_linkout_nodes&&t.copy_linkin_nodes&&Object.keys(f).forEach(o=>{let r=f[o];var e=r.links||[];"return"!=r.mode&&(e=e.map(e=>{var t=p[e],t=a(r,t);if(t)return[e,t]})).reduce((e,t)=>e&&!!t,!0)&&(s.push(o),e.forEach(([,n])=>{i.forEach(t=>{for(let e=0;e<(t.wires||[]).length;e++){var r,s=t.wires[e].indexOf(o);-1<s&&(r=n.entryNodes.map(e=>e.id),t.wires[e].splice(s,1),t.wires[e].push(...r),u.push(...n.nodes))}})}))}),t.remove_linkcall_nodes&&o.forEach(n=>{var e=l[n],t=p[e.links[0]];let o=a(e,t);t&&o&&(r.push(e.id),i.forEach(t=>{for(let e=0;e<(t.wires||[]).length;e++){var r,s=t.wires[e].indexOf(n);-1<s&&(r=o.entryNodes.map(e=>e.id),t.wires[e].splice(s,1),t.wires[e].push(...r),u.push(...o.nodes))}}))}),(i=i.filter(e=>s.indexOf(e.id)<0&&r.indexOf(e.id)<0)).push(...u)}if((i=t.remove_debugs?i.filter(e=>"debug"!=e.type&&"comment"!=e.type):i).forEach(e=>{t.name&&(e.name=RED.nodes.id()),t.shrink_node&&(e.l=!1),t.info&&(e.info="",delete e.outputLabels,delete e.inputLabels),t.position&&(e.x=150,e.y=150),t.remove_icons&&delete e.icon}),t.replace_switch){let s=(t,r)=>{for(let e=0;e<r.rules.length;e++){var s=r.rules[e];if("nnull"==s.t)t.push("if ( _propValue != null ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }");else if("null"==s.t)t.push("if ( _propValue == null ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }");else if("eq"==s.t&&"str"==s.vt){n=s.v;n=btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}));t.push("if ( _propValue === Buffer.from('"+n+"', 'base64').toString('utf-8') ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }")}else if("gt"==s.t&&"num"==s.vt)t.push("if ( _propValue > "+s.v+" ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }");else if("eq"==s.t&&"num"==s.vt)t.push("if ( _propValue == "+s.v+" ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }");else if("empty"==s.t)t.push('let p = _propValue ; if ( (Array.isArray(p) && p.length == 0) || ((typeof p === "object") && p != null && Object.keys(p).length == 0) || ((typeof p === "string") && p.length == 0) ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }');else if("nempty"==s.t)t.push('let p = _propValue ; if ( (Array.isArray(p) && p.length > 0) || ((typeof p === "object") && p != null && Object.keys(p).length > 0) || ((typeof p === "string") && p.length > 0) ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }');else{if("else"!=s.t)throw"unhandled";t.push("_returnValue.push(msg)","return node.send(_returnValue)")}}var n};i=i.map(t=>{if("switch"!=t.type)return t;var e={id:t.id,name:t.name,type:"function",x:t.x,y:t.y,func:"",outputs:t.outputs,timeout:"",noerr:0,initialize:"",finalize:"",libs:[{var:"process",module:"process"},{var:"jsonata",module:"jsonata"}],wires:t.wires};t.hasOwnProperty("z")&&(e.z=t.z),t.hasOwnProperty("l")&&(e.l=t.l);try{var r=[];if(t.checkAll)throw"unhandled";if("msg"==t.propertyType)r.push("((msg,node) => {","let _propValue = undefined","try { _propValue = RED.util.getMessageProperty(msg, '"+t.property+"') } catch (ex) {}","let _returnValue = []"),s(r,t),r.push("})(msg,node);");else{if("jsonata"!=t.propertyType)throw"unhandled";r.push("jsonata('"+t.property+"').evaluate(msg).then(_propValue => {","let _returnValue = []"),s(r,t),r.push("})")}return e.func=r.join("\n"),e}catch(e){return t}})}if(t.replace_change){let n=e=>btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}));i=i.map(t=>{if("change"!=t.type)return t;var e={id:t.id,name:t.name,type:"function",x:t.x,y:t.y,func:"",outputs:1,timeout:"",noerr:0,initialize:"",finalize:"",libs:[{var:"process",module:"process"},{var:"jsonata",module:"jsonata"}],wires:t.wires};t.hasOwnProperty("z")&&(e.z=t.z),t.hasOwnProperty("l")&&(e.l=t.l);try{var r=["(async (msg,node) => {","let __s = RED.util.setMessageProperty","let __g = RED.util.getMessageProperty"];for(let e=0;e<t.rules.length;e++){var s=t.rules[e];if("set"==s.t){if(s.dc)throw"unhandled";if("msg"==s.pt&&"str"==s.tot)r.push("__s(msg,'"+s.p+"', Buffer.from('"+n(s.to)+"', 'base64').toString('utf-8') )");else if("msg"==s.pt&&"bool"==s.tot)r.push("__s(msg,'"+s.p+"', "+s.to+")");else if("msg"==s.pt&&"num"==s.tot)r.push("__s(msg,'"+s.p+"', Number(Buffer.from('"+n(s.to)+"', 'base64').toString('utf-8')))");else if("msg"==s.pt&&"json"==s.tot)r.push("__s(msg,'"+s.p+"', JSON.parse(Buffer.from('"+n(s.to)+"', 'base64').toString('utf-8')))");else if("msg"==s.pt&&"msg"==s.tot)r.push("try { __s(msg,'"+s.p+"', __g(msg, '"+s.to+"')) } catch (ex) {}");else if("msg"==s.pt&&"env"==s.tot)r.push("__s(msg,'"+s.p+"', process.env['"+s.to+"'])");else{if("msg"!=s.pt||"jsonata"!=s.tot||!s.to.startsWith("/* @obfuscate-safe */"))throw"unhandlable";r.push("__s(msg,'"+s.p+"', await jsonata(Buffer.from('"+n(s.to)+"', 'base64').toString('utf-8')).evaluate(msg) )")}}else{if("delete"!=s.t||"msg"!=s.pt)throw"unhandlable";r.push("delete msg."+s.p)}}return r.push("node.send(msg) })(msg,node);"),e.func=r.join("\n"),e}catch(e){return console.log(e),t}})}if(t.javascript){let r={},t=[];i.forEach(e=>{"javascript"!=(r[e.id]=e).format&&"function"!=e.type&&"css"!=e.format&&"json"!=e.format||t.push(e)});var e={parse:{bare_returns:!0,expression:!1},compress:{},mangle:{reserved:["$","export","require"]},output:null,sourceMap:null,nameCache:null,toplevel:!1,warnings:!1},s={compatibility:"*",level:2};$.ajax({url:"ClientCode/"+RED.nodes.id()+"/ugify",type:"POST",contentType:"application/json; charset=utf-8",data:JSON.stringify({nodes:t,jscfg:e,csscfg:s}),success:function(e){e.forEach(e=>{var t=r[e.id];e._error&&console.log("ERROR NODE",e),"function"==t.type?t.func=e.func:"javascript"!=t.format&&"css"!=t.format&&"json"!=t.format||(t.template=e.template)}),obfuscateHelpers.openImportDialog(i)},error:function(e,t,r){RED.notify("ClientCode Communcation Failure: "+n.id+": "+t,{type:"error",timeout:3e3})}})}else obfuscateHelpers.openImportDialog(i)}
6
6
 
7
7
  function setupTreelist(){var e=collectOrphans();if(0==e.length){RED.notify("No Orphans Found",{type:"warning",timeout:2e3});try{$("#node-input-orphan-target-container-div").treeList("empty")}catch(e){}}else{try{$("#node-input-orphan-target-container-div").treeList("empty")}catch(e){$("#node-input-orphan-target-container-div").css({width:"100%",height:"calc(100%)"}).treeList({multi:!1}).on("treelistitemmouseover",function(e,t){}).on("treelistitemmouseout",function(e,t){}).on("treelistselect",function(e,t){t.node&&(RED.workspaces.show(t.node.z,!1,!1,!0),RED.view.reveal(t.node.id,!0),RED.view.redraw())}).on("treelistconfirm",function(e,t){var n;t.node&&(n=t.node.id,setTimeout(()=>{var e=RED.nodes.node(n);e&&(RED.view.reveal(e.id),RED.view.select(e.id),RED.editor.edit(e)),n==RED.workspaces.active()&&RED.workspaces.edit()},50))}),$("#node-input-orphan-target-filter").show();var n=$("#node-input-orphan-target-filter").searchBox({style:"compact",delay:300,change:function(){var e,t=$(this).val().trim().toLowerCase();""===t?($("#node-input-orphan-target-container-div").treeList("filter",null),n.searchBox("count","")):(e=$("#node-input-orphan-target-container-div").treeList("filter",function(e){return-1<e.label.toLowerCase().indexOf(t)||-1<e.node.type.toLowerCase().indexOf(t)}),n.searchBox("count",e+" / "+$("#node-input-orphan-target-container-div").treeList("data").length))}})}$("#node-input-orphan-target-container-div").treeList("data",e.sort((e,t)=>e.node.z>t.node.z))}}function collectOrphans(){const t=new Set;var n=[],i=(RED.nodes.eachLink(e=>{t.add(e.source),t.add(e.target)}),RED.nodes.eachNode(e=>{t.has(e)||n.push(e)}),[]),r={};return n.forEach(function(e){var t=RED.nodes.getType(e.type);if(t){var n=t.label,n=("function"==typeof n?n.call(e):n)||"",o=e.type;if(0===o.indexOf("subflow:"))return}t&&n||(n=e.type),r[e.id]={node:e,label:n,sublabel:o,selected:!1,checkbox:!1},i.push(r[e.id])}),i}
8
8
 
@@ -66,6 +66,8 @@
66
66
  name: $('#node-input-obfuscate-name').is(":checked"),
67
67
  info: $('#node-input-obfuscate-info').is(":checked"),
68
68
  position: $('#node-input-obfuscate-position').is(":checked"),
69
+
70
+ shrink_node: $('#node-input-obfuscate-shrink-size').is(":checked"),
69
71
  remove_groups: $('#node-input-obfuscate-remove-groups').is(":checked"),
70
72
  javascript: $('#node-input-obfuscate-javascript').is(":checked"),
71
73
 
@@ -76,6 +78,9 @@
76
78
  remove_linkout_nodes: $('#node-input-obfuscate-remove-linknodes').is(":checked"),
77
79
  copy_linkin_nodes: $('#node-input-obfuscate-copy-linkin-nodes').is(":checked"),
78
80
  remove_linkcall_nodes: $("#node-input-obfuscate-remove-linkcall-nodes").is(":checked"),
81
+
82
+ replace_switch: $('#node-input-obfuscate-replace-switch').is(":checked"),
83
+ replace_change: $('#node-input-obfuscate-replace-change').is(":checked"),
79
84
  })
80
85
  })
81
86
 
@@ -146,7 +151,11 @@
146
151
  .w-30 {
147
152
  width: 40% !important;
148
153
  margin-left: 10px;
154
+ }
155
+ .ml-30 {
156
+ margin-left: 30px !important;
149
157
  }
158
+
150
159
  </style>
151
160
 
152
161
  <!-- The html for the right sidebar plugin screen -->
@@ -203,15 +212,6 @@
203
212
 
204
213
  <div id="func-introspection-tab-obfuscation" style="display:none; min-height: calc(100%);">
205
214
 
206
- <div class="form-row">
207
- <div class="col-100">
208
- <div class="form-row node-input-target-row" style="margin-left: 10px; margin-top: 30px">
209
- <button id="node-input-obfuscation-generate-btn"
210
- class="red-ui-button"><i class="fa fa-low-vision"></i> Obfuscate</button>
211
- </div>
212
- </div>
213
- </div>
214
-
215
215
  <div class="form-row col-100">
216
216
  <label for="node-input-obfuscate-name" class="w-30">
217
217
  <i class="fa fa-tag"></i>
@@ -230,6 +230,15 @@
230
230
  style="display:inline-block; width:15px; vertical-align:baseline;">
231
231
  </div>
232
232
 
233
+ <div class="form-row">
234
+ <label for="node-input-obfuscate-shrink-size" class="w-30">
235
+ <i class="fa fa-angle-down"></i>
236
+ <span>Shrink Nodes?</span>
237
+ </label>
238
+ <input type="checkbox" checked=checked id="node-input-obfuscate-shrink-size"
239
+ style="display:inline-block; width:15px; vertical-align:baseline;">
240
+ </div>
241
+
233
242
  <div class="form-row">
234
243
  <label for="node-input-obfuscate-javascript" class="w-30">
235
244
  <i class="fa fa-code"></i>
@@ -269,12 +278,35 @@
269
278
  <div class="form-row">
270
279
  <label for="node-input-obfuscate-remove-debugs" class="w-30">
271
280
  <i class="fa fa-bug"></i>
272
- <span>Remove debugs?</span>
281
+ <span>Remove comment & debugs?</span>
273
282
  </label>
274
283
  <input type="checkbox" checked=checked id="node-input-obfuscate-remove-debugs"
275
284
  style="display:inline-block; width:15px; vertical-align:baseline;">
276
285
  </div>
277
286
 
287
+ <div class="form-row">
288
+ <label class='w-30'>
289
+ <i class="fa fa-refresh"></i>
290
+ <span>Replace Nodes:</span>
291
+ </label>
292
+ </div>
293
+
294
+ <div class="form-row">
295
+ <label for="node-input-obfuscate-replace-switch" class="ml-30">
296
+ <span>Switch</span>
297
+ </label>
298
+ <input type="checkbox" checked=checked id="node-input-obfuscate-replace-switch"
299
+ style="display:inline-block; width:15px; vertical-align:baseline;">
300
+ </div>
301
+
302
+ <div class="form-row">
303
+ <label for="node-input-obfuscate-replace-change" class="ml-30">
304
+ <span>Change</span>
305
+ </label>
306
+ <input type="checkbox" checked=checked id="node-input-obfuscate-replace-change"
307
+ style="display:inline-block; width:15px; vertical-align:baseline;">
308
+ </div>
309
+
278
310
  <div class="form-row">
279
311
  <label for="node-input-obfuscate-remove-junctions" class="w-30">
280
312
  <i class="fa fa-sitemap"></i>
@@ -286,33 +318,40 @@
286
318
 
287
319
  <div class="form-row">
288
320
  <label for="node-input-obfuscate-remove-linknodes" class="w-30">
289
- <i class="fa fa-link"></i>
321
+ <i class="fa fa-unlink"></i>
290
322
  <span>Coalesce Link Out Nodes?</span>
291
323
  </label>
292
324
  <input type="checkbox" checked=checked id="node-input-obfuscate-remove-linknodes"
293
325
  style="display:inline-block; width:15px; vertical-align:baseline;">
326
+ </div>
294
327
 
295
- <label for="node-input-obfuscate-copy-linkin-nodes" class="w-30">
328
+ <div class="form-row">
329
+ <label for="node-input-obfuscate-copy-linkin-nodes" class="ml-30">
296
330
  <span>Copy Link-In Nodes?</span>
297
331
  </label>
298
- <input type="checkbox" checked=checked id="node-input-obfuscate-copy-linkin-nodes"
299
- style="display:inline-block; width:15px; vertical-align:baseline;">
332
+ <input type="checkbox" checked=checked id="node-input-obfuscate-copy-linkin-nodes" style="display:inline-block; width:15px; vertical-align:baseline;">
300
333
  </div>
301
334
 
302
-
303
335
  <div class="form-row">
304
336
  <label for="node-input-obfuscate-remove-linkcall-nodes" class="w-30">
305
- <i class="fa fa-link"></i>
337
+ <i class="fa fa-unlink"></i>
306
338
  <span>Coalesce Link Call Nodes?</span>
307
339
  </label>
308
- <input type="checkbox" checked=checked id="node-input-obfuscate-remove-linkcall-nodes"
309
- style="display:inline-block; width:15px; vertical-align:baseline;">
340
+ <input type="checkbox" checked=checked id="node-input-obfuscate-remove-linkcall-nodes" style="display:inline-block; width:15px; vertical-align:baseline;">
310
341
  </div>
311
342
 
343
+ <div class="form-row">
344
+ <div class="col-100">
345
+ <div class="form-row node-input-target-row" style="margin-left: 10px; margin-top: 30px">
346
+ <button id="node-input-obfuscation-generate-btn"
347
+ class="red-ui-button"><i class="fa fa-low-vision"></i> Obfuscate</button>
348
+ </div>
349
+ </div>
350
+ </div>
312
351
 
313
352
  <div class="form-row" style="margin-left: 10px">
314
353
  <b>Warning</b>: No guarantee is made that the obfuscated flow still works. This has not be
315
- thoroughly tested or promises to fulfil any purpose - good or bad.
354
+ thoroughly tested. Ensure correctness by completely testing the resultant obfuscated flow.
316
355
  </div>
317
356
  </div>
318
357