Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/core/behavior-line-linker.js
Show All 23 Lines | function getRowNumber(th) { | ||||
// to prevent copy/paste of line numbers, use that. | // to prevent copy/paste of line numbers, use that. | ||||
if (th.firstChild) { | if (th.firstChild) { | ||||
var line = th.firstChild.getAttribute('data-n'); | var line = th.firstChild.getAttribute('data-n'); | ||||
if (line) { | if (line) { | ||||
return line; | return line; | ||||
} | } | ||||
} | } | ||||
return +(th.textContent || th.innerText); | return null; | ||||
} | } | ||||
JX.Stratcom.listen( | JX.Stratcom.listen( | ||||
['click', 'mousedown'], | ['click', 'mousedown'], | ||||
['phabricator-source', 'tag:th', 'tag:a'], | ['phabricator-source', 'tag:th', 'tag:a'], | ||||
function(e) { | function(e) { | ||||
if (!e.isNormalMouseEvent()) { | if (!e.isNormalMouseEvent()) { | ||||
return; | return; | ||||
▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines |