Created
June 23, 2016 15:06
-
-
Save michaelabon/334bf7725ee933277eb1a12627f2c8df to your computer and use it in GitHub Desktop.
pivotal tracker bookmarklets
This file contains hidden or 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:$('.project_name:not(:contains("' + $('.raw_context_name').text() + '"))').parent().parent().remove() | |
javascript:( | |
var visitNotificationSettings = function() { | |
window.href = "https://www.pivotaltracker.com/notification_settings"; | |
}; | |
var currentPageIsNotificationSettings = function() { | |
return document.getElementById('project_notifications_flash'); | |
}; | |
var disableOtherProjectNotifications = function() { | |
if (!currentPageIsNotificationSettings()) { | |
return; | |
} | |
var projectNotificationsEditButton = document.getElementById('project_notifications_flash').nextElementSibling.querySelector(".edit_button"); | |
projectNotificationsEditButton.click(); | |
var projectsWithNotifications = document.querySelectorAll(".project_notifications_form input[type=checkbox]:checked") | |
var validProjectIDs = ['6227226', '4167236']; | |
var validProjects = validProjectIDs.map(function(projectID) { | |
return 'project_notifications_' + projectID; | |
}); | |
projectsWithNotifications.forEach(function(project) { | |
if (!validProjects.includes(project.id)) { | |
project.checked = false; | |
} | |
}) | |
document.getElementById('project_notifications').querySelector('.save_button').click() | |
}; | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Second one doesn't quite work yet. Copy and paste it still.