Skip to content

Instantly share code, notes, and snippets.

@michaelabon
Created June 23, 2016 15:06
Show Gist options
  • Save michaelabon/334bf7725ee933277eb1a12627f2c8df to your computer and use it in GitHub Desktop.
Save michaelabon/334bf7725ee933277eb1a12627f2c8df to your computer and use it in GitHub Desktop.
pivotal tracker bookmarklets
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()
};
)
@michaelabon
Copy link
Author

Second one doesn't quite work yet. Copy and paste it still.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment