Github Move Checks

A userscript that move checks to the top of the page

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        Github Move Checks
// @description A userscript that move checks to the top of the page
// @license     MIT
// @author      Marco Pelegrini
// @namespace   https://github.com/marcopelegrini
// @version     1.0.0
// @include     https://*github*/*
// @exclude     https://*github*/*/*.diff
// @exclude     https://*github*/*/*.patch
// @run-at      document-idle
// @grant       GM.addStyle
// @grant       GM_addStyle
// @icon        https://github.githubassets.com/pinned-octocat.svg
// ==/UserScript==

(function () {
    function moveChecks() {
       let actions = document.getElementsByClassName('discussion-timeline-actions')[0];
       actions.style.border = "none";
       document.getElementsByClassName('js-pull-discussion-timeline')[0].prepend(actions);
       document.getElementsByClassName('js-discussion js-socket-channel')[0].append(document.getElementsByClassName('timeline-comment-wrapper')[0]);
       document.getElementsByClassName('merge-pr-more-commits')[0].hidden=true;
    }

    moveChecks();
})();