Skip to content

Instantly share code, notes, and snippets.

@burkybang
Last active October 10, 2023 20:33
Show Gist options
  • Save burkybang/eab17656e79dc763372291126b49e2bf to your computer and use it in GitHub Desktop.
Save burkybang/eab17656e79dc763372291126b49e2bf to your computer and use it in GitHub Desktop.
SuiteAdvanced Scripts
/* SuiteApps tab for non-Admins */
html:not(.admin-role) [data-walkthrough="Menu:SuiteApps"],
/* Support tab for non-Admins */
html:not(.admin-role) [data-walkthrough="Menu:Support"],
/* Floating Guided Learning launcher */
.ou-convergence-launcher
{
display: none !important;
}
// Perform functions based on the internal ID of the current user's role
/** @type {string} */
const roleId = document.documentElement.dataset.roleId;
console.log('roleId:', roleId);
switch (roleId) {
// Administrator
case '3':
break;
// CEO
case '8':
break;
// Sales Manager
case '9':
break;
}
/* Apply style based on the internal ID of the current user's role */
/* Apply style for the Administrator role */
html[data-role-id="3"] {
}
/* Apply style for the CEO role */
html[data-role-id="8"] {
}
/* Apply style for the Sales Manager role */
html[data-role-id="9"] {
}
// Perform functions based on the current URL path
switch (location.pathname) {
// Dashboard
case '/app/center/card.nl':
break;
// File Cabinet
case '/app/common/media/mediaitemfolders.nl':
break;
// Saved Search Results
case '/app/common/search/searchresults.nl':
break;
}
/* Apply style based on the current URL path */
/* Apply style to Dashboard */
html[data-path="/app/center/card.nl"] {
}
/* Apply style to File Cabinet */
html[data-path="/app/common/media/mediaitemfolders.nl"] {
}
/* Apply style to Saved Search Results */
html[data-path="/app/common/search/searchresults.nl"] {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment