Created
April 9, 2020 20:54
-
-
Save Azsaturndx/6df2f70c83c0d26e7e15303da2d5c35b to your computer and use it in GitHub Desktop.
Hide role GUI controls - Code onTime
This file contains 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
/** | |
* Hide Roles controls | |
* (Code onTime) | |
* AzsaturnDx (2020) - No copyright at all | |
* | |
* Hides all role-based controls from user. | |
* | |
*/ | |
// Expressed in milliseconds | |
var refreshInterval = 250; | |
removeElementsLoop(); | |
function removeElementsLoop() { | |
setTimeout(function () { | |
//Hides "Roles" field in a single user edit form | |
$("span[data-field='Roles']").parent().hide(); | |
//Hides "Roles" option in view selector | |
$("a.ui-btn[data-text='Roles']").hide(); | |
removeElementsLoop(); | |
}, refreshInterval); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment