Skip to content

Instantly share code, notes, and snippets.

@projected1
Last active August 25, 2022 21:48
Show Gist options
  • Save projected1/b6d8c389519b664ab75afe4e8e936ddd to your computer and use it in GitHub Desktop.
Save projected1/b6d8c389519b664ab75afe4e8e936ddd to your computer and use it in GitHub Desktop.
Disables like button popup menu in Pivotal Tracker stories.
// ==UserScript==
// @name Pivotal Tracker Like Button Popup Killer
// @namespace https://gist.github.com/projected1
// @version 0.1
// @description Disables like button popup menu in Pivotal Tracker stories
// @author Daniel Gorbatov
// @license MIT
// @homepage https://gist.github.com/projected1/b6d8c389519b664ab75afe4e8e936ddd
// @match https://www.pivotaltracker.com/n/projects/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
(function() {
const handle = setInterval(() => {
const elements = document.querySelectorAll('[data-aid="StoryPreviewItem"]');
if (elements.length) {
clearInterval(handle);
elements.forEach(el => (el.onclick = () =>
setTimeout(
() => document.querySelectorAll('[data-aid="ReactDropdownButton"]')
.forEach(el => (el.onmouseover = e => e.stopPropagation()))
, 1000)));
}
}, 100)
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment