aboutsummaryrefslogtreecommitdiffstats
path: root/public/js/print_element.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2014-09-01 15:12:27 -0700
committerAdam Soltys <[email protected]>2014-09-01 15:12:27 -0700
commit40083923ed74eb026135d78600ebf55ff0a9e32c (patch)
treeaf2e75cebeac31ff507615d6608b0c7a84022849 /public/js/print_element.js
parent8fe5b97004189845ee98a02ab197ca080ff0a002 (diff)
downloadcoinos-server-40083923ed74eb026135d78600ebf55ff0a9e32c.tar.gz
coinos-server-40083923ed74eb026135d78600ebf55ff0a9e32c.zip
Support BIP32 HD Wallets
Diffstat (limited to 'public/js/print_element.js')
-rw-r--r--public/js/print_element.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/public/js/print_element.js b/public/js/print_element.js
new file mode 100644
index 00000000..ee0e7212
--- /dev/null
+++ b/public/js/print_element.js
@@ -0,0 +1,26 @@
+function printElement(elem, append, delimiter) {
+ var domClone = elem.cloneNode(true);
+
+ var $printSection = document.getElementById("printSection");
+
+ if (!$printSection) {
+ var $printSection = document.createElement("div");
+ $printSection.id = "printSection";
+ document.body.appendChild($printSection);
+ }
+
+ if (append !== true) {
+ $printSection.innerHTML = "";
+ }
+
+ else if (append === true) {
+ if (typeof (delimiter) === "string") {
+ $printSection.innerHTML += delimiter;
+ }
+ else if (typeof (delimiter) === "object") {
+ $printSection.appendChlid(delimiter);
+ }
+ }
+
+ $printSection.appendChild(domClone);
+}