Remove unused tracker anchor helper functions
This commit is contained in:
@@ -296,19 +296,6 @@ function setTrackerInsertionMarkerLocked(marker, locked) {
|
|||||||
marker.dataset.anchorLocked = locked ? '1' : '0';
|
marker.dataset.anchorLocked = locked ? '1' : '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTrackerInsertionAnchorInPost(postElement, buttonBar) {
|
|
||||||
if (!postElement || !buttonBar || !postElement.contains(buttonBar)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
let anchor = buttonBar;
|
|
||||||
while (anchor.parentElement && anchor.parentElement !== postElement) {
|
|
||||||
anchor = anchor.parentElement;
|
|
||||||
}
|
|
||||||
|
|
||||||
return anchor && anchor.parentElement === postElement ? anchor : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function isNodeAfter(node, referenceNode) {
|
function isNodeAfter(node, referenceNode) {
|
||||||
if (!node || !referenceNode || node === referenceNode) {
|
if (!node || !referenceNode || node === referenceNode) {
|
||||||
return false;
|
return false;
|
||||||
@@ -794,16 +781,6 @@ function insertMarkerBeforeAnchor(postElement, marker, anchor) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function insertMarkerAfterAnchor(postElement, marker, anchor) {
|
|
||||||
const target = normalizeTrackerInsertionAnchor(postElement, anchor);
|
|
||||||
if (!target || !target.parentElement) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
target.parentElement.insertBefore(marker, target.nextSibling);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getNextNonTrackerSibling(node) {
|
function getNextNonTrackerSibling(node) {
|
||||||
if (!node) {
|
if (!node) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user