fix: Use insertBefore on mounting content script UI

This commit is contained in:
okou
2024-02-09 21:03:16 +09:00
committed by Aaron
parent 295f8601e3
commit ba85fdf470
+2 -2
View File
@@ -217,10 +217,10 @@ function mountUi(
anchor.replaceWith(root);
break;
case 'after':
anchor.replaceWith(anchor, root);
anchor.parentElement?.insertBefore(root, anchor.nextElementSibling);
break;
case 'before':
anchor.replaceWith(root, anchor);
anchor.parentElement?.insertBefore(root, anchor);
break;
default:
options.append(anchor, root);