Last active
January 27, 2020 10:18
-
-
Save asigner/9e863a60277afe806dc7 to your computer and use it in GitHub Desktop.
User script removes unused Proles activities from reporting view
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @author Andy Signer | |
// @name Simple Proles Reporting View | |
// @namespace https://gist.github.com/asigner | |
// @description Uncluttered Proles reporting view. Simplifies daily reporting by removing unused activities. | |
// @include https://www.app2.proles.ch/leistung/stundenerf.asp* | |
// @version 0.0.1 | |
// @grant none | |
// ==/UserScript== | |
// Enable user script | |
var enabled = true | |
// List all activities which should be visible | |
var displayedActivities = ["Planning"] | |
// Hide all activities which should not be displayed | |
var projects = document.getElementById("detailstaff").getElementsByTagName("table")[2].getElementsByClassName("stu") | |
for (var i=0, item; item = projects[i]; i++) { | |
if(enabled && displayedActivities.indexOf(projects[i].title) == -1){ | |
projects[i].parentNode.style.display = 'none'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is it?
A user scripts which removes unused activities from the Proles reporting view. This can make your daily reporting faster if you are working with just a handful activities.
How to install?
Firefox
Install Greasemonkey, restart Firefox and then press the
Raw
button of this gist. Follow the installation process.Chrome
Install Tampermonkey. Press
Get a new script
. Choose Github/Gist and search forasigner
. Chooseasigner/uncluttered-proles-reporting-view.user.js
to be installed.How to configure
Edit the installed user script by adding all needed activities to the displayedActivities array.
Activities which are not in this list will be hidden.