@gregoriusrippenstein/node-red-contrib-introspection 0.0.7 → 0.0.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.
- package/nodes/15-screenshot.html +13 -2
- package/package.json +1 -1
package/nodes/15-screenshot.html
CHANGED
|
@@ -248,12 +248,15 @@
|
|
|
248
248
|
if ( !window[functName] ) {
|
|
249
249
|
window[functName] = (e,m) => {
|
|
250
250
|
if ( m.msg == "timer-tripped" ) {
|
|
251
|
+
RED.notify("Screenshot triggered", { type: "warning" });
|
|
251
252
|
nr_intro_generate_svg( (svgdata) => {
|
|
252
253
|
$.ajax({
|
|
253
254
|
type: "POST",
|
|
254
255
|
url: "/screenshot",
|
|
255
256
|
data: { d: svgdata },
|
|
256
|
-
|
|
257
|
+
complete: (data) => {
|
|
258
|
+
RED.notify("Screenshot posted", { type: "success" });
|
|
259
|
+
},
|
|
257
260
|
dataType: "image/svg+xml;charset=utf-8"
|
|
258
261
|
});
|
|
259
262
|
});
|
|
@@ -315,6 +318,13 @@
|
|
|
315
318
|
document.body.removeChild(downloadLink);
|
|
316
319
|
});
|
|
317
320
|
|
|
321
|
+
$('#node-screenshot-copy-to-clipboard-svg').on("click", function (e) {
|
|
322
|
+
e.preventDefault();
|
|
323
|
+
if ( RED.clipboard.copyText(that.editor.getValue()) ) {
|
|
324
|
+
RED.notify("SVG copied to clipboard", { type: "success" });
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
|
|
318
328
|
$("#node-input-format").on("change", function() {
|
|
319
329
|
var mod = "ace/mode/"+$("#node-input-format").val();
|
|
320
330
|
that.editor.getSession().setMode({
|
|
@@ -402,7 +412,8 @@
|
|
|
402
412
|
</div>
|
|
403
413
|
|
|
404
414
|
<div class="form-row">
|
|
405
|
-
|
|
415
|
+
<button type="button" id="node-screenshot-download-svg" class="red-ui-button red-ui-button-large"><i class="fa fa-download"></i>Download</button>
|
|
416
|
+
<button type="button" id="node-screenshot-copy-to-clipboard-svg" class="red-ui-button red-ui-button-large"><i class="fa fa-clipboard"></i>Copy to Clipboard</button>
|
|
406
417
|
</div>
|
|
407
418
|
</script>
|
|
408
419
|
|