Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/core/behavior-oncopy.js
| Show First 20 Lines • Show All 265 Lines • ▼ Show 20 Lines | if (JX.DOM.isType(node, 'td')) { | ||||
| var node_mode = node.getAttribute('data-copy-mode'); | var node_mode = node.getAttribute('data-copy-mode'); | ||||
| if (node_mode !== copy_mode) { | if (node_mode !== copy_mode) { | ||||
| return; | return; | ||||
| } | } | ||||
| // Otherwise, fall through and extract this node's text normally. | // Otherwise, fall through and extract this node's text normally. | ||||
| } | } | ||||
| if (node.getAttribute) { | |||||
| var copy_text = node.getAttribute('data-copy-text'); | |||||
| if (copy_text) { | |||||
| return copy_text; | |||||
| } | |||||
| } | |||||
| if (!node.childNodes || !node.childNodes.length) { | if (!node.childNodes || !node.childNodes.length) { | ||||
| return node.textContent; | return node.textContent; | ||||
| } | } | ||||
| for (ii = 0; ii < node.childNodes.length; ii++) { | for (ii = 0; ii < node.childNodes.length; ii++) { | ||||
| var child = node.childNodes[ii]; | var child = node.childNodes[ii]; | ||||
| text.push(extract_text(child)); | text.push(extract_text(child)); | ||||
| } | } | ||||
| Show All 34 Lines | |||||