Created
May 23, 2015 16:38
-
-
Save mike0004/db74ad513a22096f5a1d to your computer and use it in GitHub Desktop.
Bookmarklet to jump to the Jenkins configuration page of a job
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
javascript:(function()%7Btarget%3D"/configure"%3Bcurr%3Dwindow.location.href%3Bwhile((curr.lastIndexOf("/")%2B1)%3D%3Dcurr.length)%7Bcurr%3Dcurr.substr(0,curr.length-1)%3B%7Dloc1%3Dcurr.indexOf("/job/")%3Bif(loc1<0)%7Balert("must be in a job")%3Breturn%3B%7Djobrootloc%3Dloc1%2B5%3Bloc2%3Dcurr.indexOf("/",jobrootloc)%3Bif(loc2>%3D0)%7Bpath%3Dcurr.substring(0,loc2)%3B%7Delse%7Bpath%3Dcurr%7Dwindow.location.href%3Dpath%2Btarget%3B%7D)()%3B |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment