Old Github languages bar

move the languages bar to the top like the old github

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Old Github languages bar
// @namespace    http://tampermonkey.net/
// @version      0.6
// @description  move the languages bar to the top like the old github
// @author       jrvgr
// @match        https://github.com/*/*
// @exclude      https://github.com/*/*/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=github.com
// @grant        window.onurlchange
// ==/UserScript==

(function() {
    'use strict';

    shiftLayout()
    if (window.onurlchange === null) addEventListener('urlchange', shiftLayout);

    function shiftLayout() {
    setTimeout(() => {
    const cell = document.querySelector(".BorderGrid-row:has(li > .mr-3 > svg")
    const langs = document.querySelector(".BorderGrid-row ul:has(li > .mr-3 > svg)")
    const bar = document.querySelector(".mb-2:has(.Progress > span.Progress-item.color-bg-success-emphasis)")
    const legacyNewPlace = document.querySelector(".Layout-main div")
    const newPlace = document.querySelector("div[data-selector='repos-split-pane-content'] div:has(div + div) div")
    if (newPlace) {
        newPlace.insertAdjacentElement("afterEnd", bar)
        bar.insertAdjacentElement("afterEnd", langs)
    } else {
        legacyNewPlace.insertAdjacentElement("afterEnd", bar)
        bar.insertAdjacentElement("afterEnd", langs)
    }
    langs.setAttribute('style', 'margin-bottom: 1em !important; display: flex; justify-content: space-evenly; flex-wrap: wrap; background: var(--color-notifications-row-read-bg); border-radius: 5px; border: var(--color-bg-discussions-row-emoji-box) 1px solid; box-sizing: border-box; padding: 5px; padding-bottom: 3px; margin-top: 10px;');
    cell.remove()
    }, 0)
    }
})();