-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTampermonkeySalesforceLightningAdminLinks.user.js
69 lines (65 loc) · 4.92 KB
/
TampermonkeySalesforceLightningAdminLinks.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// ==UserScript==
// @name Tampermonkey Salesforce Lightning Admin Links
// @description Setup links to the top of all Lightning Salesforce pages
// @version 1.8
// @author Sandeep Gaikwad
// @updateURL https://github.com/sandeep-mg/Tampermonkey-Salesforce-Lightning-Admin-Links/raw/main/TampermonkeySalesforceLightningAdminLinks.user.js
// @downloadURL https://github.com/sandeep-mg/Tampermonkey-Salesforce-Lightning-Admin-Links/raw/main/TampermonkeySalesforceLightningAdminLinks.user.js
// @match https://*.lightning.force.com/*
// @match https://*.salesforce-setup.com/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant GM_addStyle
// ==/UserScript==
function addSetupLinks(jNode) {
/* these are lightning setup urls:
setup home - setup/one/one.app#/setup/home
apex classes - /one/one.app?source=aloha#/setup/ApexClasses/home
debug logs - /one/one.app?source=aloha#/setup/ApexDebugLogs/home
apex jobs - /one/one.app?source=aloha#/setup/AsyncApexJobs/home
vf pages - /one/one.app?source=aloha#/setup/ApexPages/home
custom settings - /one/one.app?source=aloha#/setup/CustomSettings/home
users - /one/one.app?source=aloha#/setup/ManageUsers/home
profiles - /one/one.app?source=aloha#/setup/EnhancedProfiles/home
NOT USING lighting setup urls above YET because it SUCKS
*/
jNode.prepend (
'<span style="color:#000000;font-weight:bold;padding:0px;margin-top:3px;"><a href="/" style="color:#000000;">Home</a> | ' +
'<a href="/lightning/setup/SetupOneHome/home" style="color:#000000;">Setup</a> | ' +
'<a target="_blank" href="chrome-extension://hpijlohoihegkfehhibggnkbjhoemldh/data-export.html?host=mathworks.my.salesforce.com&query" style="color:#ff0000;">Data Export</a> | ' +
'<a href="/lightning/setup/ObjectManager/home" style="color:#000000;">Objects</a> | ' +
'<a href="/lightning/setup/CustomSettings/home" style="color:#000000;">CS</a> | ' +
'<a href="/lightning/setup/PermSets/home" style="color:#000000;">Perm Set</a> | ' +
'<a href="/lightning/setup/ManageUsers/home" style="color:#000000;">Users</a> | ' +
'<a href="/lightning/setup/EnhancedProfiles/home" style="color:#000000;">Profiles</a> | ' +
'<a target="_blank" href="/HelpAndTrainingDoor?resource=https://help.salesforce.com/s/support&version=2" style="color:#000000;">Help</a> | ' +
'<a target="_blank" href="/_ui/common/apex/debug/ApexCSIPage" style="color:#000000;">Dev Console</a> | ' +
'<a href="/ltng/switcher?destination=classic" style="color:#000000;">Classic</a> | '+
// Add Second Line
'<br>'+
'<a href="/lightning/app/06m31000000xJqUAAU" style="color:#000000;">Sales Console</a> | ' +
'<a href="/lightning/app/06m31000000xJtzAAE" style="color:#000000;">Service Console</a> | '+
'<a href="/lightning/setup/DataManagementCreateTestInstance/home" style="color:#000000;">Sandboxes</a> | '
/* '<a href="/lightning/setup/ObjectManager/home" style="color:#000000;">Blank</a> | ' +
'<a href="/lightning/setup/CustomSettings/home" style="color:#000000;">Blank</a> | ' +
'<a href="/lightning/setup/PermSets/home" style="color:#000000;">Blank</a> | ' +
'<a href="/lightning/setup/ManageUsers/home" style="color:#000000;">Blank</a> | ' +
'<a href="/lightning/setup/EnhancedProfiles/home" style="color:#000000;">Blank</a> | ' +
'<a target="_blank" href="/HelpAndTrainingDoor?resource=https://help.salesforce.com/s/support&version=2" style="color:#000000;">Blank</a> | ' +
'<a target="_blank" href="/_ui/common/apex/debug/ApexCSIPage" style="color:#000000;">Blank</a></span> | '
*/
/*
//'<a href="/setup/ui/listApexTraces.apexp" style="color:#000000;">Logs</a> | ' +
//'<a href="/_ui/networks/setup/SetupNetworksPage" style="color:#000000;">Dig Ex</a> | ' +
//'<a href="/01p" style="color:#000000;">Classes</a> | ' +
//'<a href="/ui/setup/apex/ApexTestQueuePage" style="color:#000000;">Tests</a> | ' +
//'<a href="/apexpages/setup/listApexPage.apexp" style="color:#000000;">Pages</a> | ' +
//'<a href="/apexpages/setup/listAsyncApexJobs.apexp" style="color:#000000;">Jobs</a> | ' +
//'<a href="/08e" style="color:#000000;">Sched</a> | ' +
//'<a href="/_ui/platform/ui/schema/wizard/entity/CustomMetadataTypeListPage?setupid=CustomMetadata" style="color:#000000;">CMT</a> | ' +
//'<a href="/one/one.app#/settings/personal/PersonalInformation/home" style="color:#000000;">MS</a> | ' +
*/
);
}
//waitForKeyElements("div[class='system-message level-info']", addSetupLinks);
waitForKeyElements("div[class='slds-button-group slds-global-actions__favorites oneFavorites']", addSetupLinks);