Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
GitHub pull request timeline toggle "force-pushed" events bookmarklet.

GitHub pull request toggle "force-pushed" events bookmarklet

Since November 2018, GitHub have started to display forced push events to pull request page timelines. This bookmarklet will toggle display of these events if they are getting in the way of meaningful commits.

Add the code below as the URL of a new bookmark:

javascript:((d)=>{if(d.getElementById('nuke-fp')==null){let e=d.createElement('style');'nuke-fp';e.innerHTML='.nuke-fp{display:none}';d.getElementsByTagName('head')[0].appendChild(e)}for(let e of Array.from(d.querySelectorAll('.discussion-timeline .discussion-item-head_ref_force_pushed'))){e.classList.toggle('nuke-fp')}})(document)

Tested with Chrome 70.0.3538.102.

Uncompressed source provided below.

((d) => {
if (d.getElementById('nuke-fp') == null) {
let e = d.createElement('style'); = 'nuke-fp';
e.innerHTML = '.nuke-fp{display:none}';
for (let e of Array.from(d.querySelectorAll('.discussion-timeline .discussion-item-head_ref_force_pushed'))) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.