Compare commits

...

2 Commits
v1.0.0 ... main

Author SHA1 Message Date
Guy Van Sanden
59c891a937 Fixed readme 2025-04-09 14:09:04 +02:00
Guy Van Sanden
310679ce3c Renamed script 2025-04-09 13:51:08 +02:00
7 changed files with 53 additions and 11 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
build/*

8
Makefile Normal file
View File

@ -0,0 +1,8 @@
APP_NAME=minimalprofile
VERSION=$(shell grep '<version>' appinfo/info.xml | sed -E 's/.*<version>(.*)<\/version>.*/\1/')
.PHONY: appstore
appstore:
mkdir -p build
tar --exclude-vcs --exclude='build' --exclude='*.tar.gz' -czf build/$(APP_NAME)-$(VERSION).tar.gz -C .. $(notdir $(CURDIR))

View File

@ -1,2 +1,23 @@
# nextcloud_minimalprofile # Minimal Profile Display for Nextcloud
**Minimal Profile Display** is a lightweight Nextcloud app that allows users and administrators to simplify user profile pages by hiding certain optional fields, such as pronouns.
This app is perfect for those who prefer a cleaner, distraction-free interface without altering the underlying user data.
---
## ✨ Features
- Hide the Pronouns field from user profiles
- Lightweight: No database changes or backend processing
- Fully reversible: Simply disable the app to restore default profiles
- Compatible with Nextcloud 26 to 31
---
## 📥 Installation
1. Download the latest release from the [Releases page](https://code.taurix.net/TaurixIT/nextcloud_minimalprofile/releases).
2. Extract the archive into your Nextcloud `custom_apps/` directory:
```bash
tar -xvzf minimalprofile-*.tar.gz -C /var/www/nextcloud/custom_apps/

View File

@ -3,5 +3,5 @@ namespace OCA\MinimalProfile\AppInfo;
use OCP\Util; use OCP\Util;
Util::addStyle('minimalprofile', 'style'); Util::addStyle("minimalprofile", "style");
Util::addScript('minimalprofile', 'script'); Util::addScript("minimalprofile", "hidePronouns");

View File

@ -9,7 +9,7 @@
</description> </description>
<version>1.0.0</version> <version>1.0.0</version>
<licence>agpl</licence> <licence>agpl</licence>
<author>Your Name</author> <author>Guy Van Sanden</author>
<namespace>MinimalProfile</namespace> <namespace>MinimalProfile</namespace>
<dependencies> <dependencies>
<nextcloud min-version="26" max-version="31" /> <nextcloud min-version="26" max-version="31" />

19
js/hidePronouns.js Normal file
View File

@ -0,0 +1,19 @@
document.addEventListener("DOMContentLoaded", function () {
function tryToHidePronouns() {
const sections = document.querySelectorAll("section");
for (const section of sections) {
const label = section.querySelector("label");
if (label && label.textContent.trim().toLowerCase() === "pronouns") {
console.log("Found Pronouns field, hiding section...");
section.style.display = "none";
clearInterval(checkInterval); // stop checking
return;
}
}
}
const checkInterval = setInterval(tryToHidePronouns, 500); // retry every half second
console.log("Started polling to find Pronouns field...");
});

View File

@ -1,7 +0,0 @@
document.addEventListener('DOMContentLoaded', function () {
const pronounField = document.querySelector('[data-profile-field="pronouns"]');
if (pronounField) {
pronounField.style.display = 'none';
}
});