您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
move the languages bar to the top like the old github
当前为
// ==UserScript== // @name Old Github languages bar // @namespace http://tampermonkey.net/ // @version 0.2 // @description move the languages bar to the top like the old github // @author jrvgr // @match 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) { window.addEventListener('urlchange', (info) => shiftLayout()); } function shiftLayout() { const bar = document.querySelector(".mb-2:has(.Progress > span.Progress-item.color-bg-success-emphasis)") const legacyNewBarPlace = document.querySelector(".Layout-main div") const newBarPlace = document.querySelector("div[data-selector='repos-split-pane-content'] div:has(div + div) div") if (newBarPlace) { newBarPlace.insertAdjacentElement("afterEnd", bar) } else { legacyNewBarPlace.insertAdjacentElement("afterEnd", bar) } bar.setAttribute('style', 'margin-bottom: 1em !important'); const langs = document.querySelector(".BorderGrid-row ul:has(li > a.Link--secondary)") const newLangsPlace = document.querySelector("div.Layout-sidebar > div > div.BorderGrid-row.hide-sm.hide-md > div > h3"); newLangsPlace.insertAdjacentElement("beforeBegin", langs) } })();