Refined GitHub Reactions

Enhances the GitHub Reactions page, making them more compact.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Refined GitHub Reactions
// @license      MIT
// @homepageURL  https://github.com/patak-dev/refined-github-reactions
// @supportURL   https://github.com/patak-dev/refined-github-reactions
// @namespace    https://greasyfork.org/en/scripts/463344-refined-reactions
// @version      0.1.10
// @description  Enhances the GitHub Reactions page, making them more compact.
// @author       patak-dev
// @match        https://github.com/**
// @icon         https://www.google.com/s2/favicons?sz=64&domain=github.com
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function () {
  'use strict'
  const issueOrPRContainer = ':is(.js-issues-results, .pull-discussion-timeline)'
  const style = document.createElement('style')
  style.innerHTML = `
${issueOrPRContainer} .js-reactions-container {
  flex-direction: row !important;
  position: absolute;
  right: 5px;
  transform: translate(0px, -13px);
  z-index: 10;
}
${issueOrPRContainer} .js-reactions-container .js-reaction-group-button {
  background-color: var(--color-canvas-subtle);
}
${issueOrPRContainer} .TimelineItem--condensed {
  padding-bottom: 14px;
}
${issueOrPRContainer} .review-thread-component .timeline-comment-group  {
  padding-bottom: 26px;
}
${issueOrPRContainer} .review-thread-component .js-reactions-container {
  transform: translate(0px, -10px);
}
${issueOrPRContainer} .js-reactions-container .details-overlay[open] > summary::before {
  top: -400px;
  right: -400px;
  bottom: -400px;
  left: -400px;
}
${issueOrPRContainer} .is-comment-editing .js-reactions-container {
  visibility: hidden;
}
.discussion-timeline-actions {
  border-top: 0;
}

/* GitHub's new design of issue page */
[data-testid="issue-viewer-issue-container"],
.react-issue-comment {
  position: relative;
}
[aria-label="Reactions"] {
  position: absolute;
  bottom: -12px;
  right: 10px;
}
[aria-label="Reactions"] button[role="switch"] {
  background: var(--color-canvas-default);
}
`
  document.head.appendChild(style)
})()