remove old hook

This commit is contained in:
matty 2025-04-02 12:27:42 -04:00
parent 640712769e
commit d0d6d8ebc3

View File

@ -10,33 +10,6 @@ async function register({
/**
* Add link admin page
*/
registerHook({
target: "action:router.navigation-end",
handler: async (params) => {
if (params.path.startsWith("/my-account")) {
if (document.getElementById("ncd-subscription-link")) return;
let href = "/p/ncd-my-subscription";
// Get menu container
const menuContainer = document.getElementsByClassName("sub-menu")[0];
// Create link
const content = `
<a _ngcontent-dke-c79="" id="ncd-subscription-link" routerlinkactive="active" class="sub-menu-entry ng-star-inserted" href="${href}">
${await peertubeHelpers.translate("NCTV Storage")}
</a>
`;
// Create node for it
const nodeLink = document.createElement("div");
nodeLink.innerHTML = content.trim();
// Insert to menu container
menuContainer.appendChild(nodeLink.firstChild);
}
},
});
registerHook({
target: "filter:left-menu.links.create.result",