Skip to content

Commit

Permalink
Category Management: no add profile button for top level categories a…
Browse files Browse the repository at this point in the history
…nd non-existent ones
  • Loading branch information
FlominatorTM committed Jun 9, 2024
1 parent bcb9e34 commit 6937aaf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/features/category_management/category_management.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,15 @@ function AddOptionalCategoryPageLinks(options) {
}

function AddAddProfileToCategory() {
const hideanons = document.getElementsByClassName("hideanon");
if (hideanons.length > 0 && hideanons[0].innerText.includes("high level category")) {
return;
}
const noarticletext = document.getElementsByClassName("noarticletext");
if (noarticletext.length > 0) {
return;
}

const elementToAttach = document.getElementsByTagName("h1")[0].previousSibling;
const addDiv = document.createElement("div");
addDiv.style.float = "right";
Expand Down

0 comments on commit 6937aaf

Please sign in to comment.