Created
November 20, 2016 18:49
-
-
Save shrutis22/bb56ba8ce2e92272fd66ec881a7a6652 to your computer and use it in GitHub Desktop.
Script to add custom Logout link in Salesforce. This has to be installed in TamperMonkey
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
// ==UserScript== | |
// @name Custom Logout Flow for Salesforce | |
// @version 1.0 | |
// @description Custom Logout Flow for Salesforce | |
// @author Shruti Sridharan | |
// @match https://*.salesforce.com/* | |
// @require https://code.jquery.com/jquery-latest.js | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var $actualLink = $( "a[href='/secur/logout.jsp']" ); | |
var $parent = $actualLink.parent(); | |
var $newLink = $( "<a/>" ).attr( "href", "/apex/logout" ).html( "Logout from Salesforce" ); | |
$parent.append( $newLink ); | |
$actualLink.remove(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment