Skip to content

Instantly share code, notes, and snippets.

@asigner
Last active January 27, 2020 10:18
Show Gist options
  • Save asigner/9e863a60277afe806dc7 to your computer and use it in GitHub Desktop.
Save asigner/9e863a60277afe806dc7 to your computer and use it in GitHub Desktop.
User script removes unused Proles activities from reporting view
// ==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';
}
}
@asigner
Copy link
Author

asigner commented May 1, 2015

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 for asigner. Choose asigner/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.

var displayedActivities = [ "Activity1", "Activity2", "Activity3", "Activity4" ]

Activities which are not in this list will be hidden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment