-
-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathgithub-sort-by-date.user.js
133 lines (130 loc) · 19.7 KB
/
github-sort-by-date.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
// ==UserScript==
// @name GitHub Sort by Date
// @name:zh-CN GitHub 按日期排序
// @description:zh-CN 将文件排序方式改为日期降序,方便查看最新更新的文件。
// @name:ar GitHub الترتيب حسب التاريخ
// @description:ar تغيير فرز الملفات إلى تنازلي حسب التاريخ,عرض مريح لأحدث الملفات المحدثة。
// @name:bg GitHub Сортиране по дата
// @description:bg Променете сортирането на файлове на низходящо по дата,Удобен преглед на последните актуализирани файлове。
// @name:cs GitHub Seřadit podle data
// @description:cs Změnit řazení souborů na sestupné podle data,Pohodlně si prohlédněte nejnovější aktualizované soubory。
// @name:da GitHub Sorter efter dato
// @description:da Skift filsortering til faldende efter dato,Se bekvemt de seneste opdaterede filer。
// @name:de GitHub Nach Datum sortieren
// @description:de Ändern Sie die Sortierung der Dateien auf absteigend nach Datum,Sehen Sie sich bequem die neuesten aktualisierten Dateien an。
// @name:el GitHub Ταξινόμηση κατά ημερομηνία
// @description:el Αλλαγή της ταξινόμησης αρχείων σε φθίνουσα κατά ημερομηνία,Προβάλετε άνετα τα πιο πρόσφατα ενημερωμένα αρχεία。
// @name:en GitHub Sort by date
// @description:en Change file sorting to descending by date,Conveniently view the latest updated files。
// @name:eo GitHub Ordigi laŭ dato
// @description:eo Ŝanĝu dosierordigon al malkreskanta laŭ dato,Oportune vidi la lastajn ĝisdatigitajn dosierojn。
// @name:es GitHub Ordenar por fecha
// @description:es Cambiar la clasificación de archivos a descendente por fecha,Vea cómodamente los últimos archivos actualizados。
// @name:fi GitHub Lajittele päivämäärän mukaan
// @description:fi Muuta tiedostojen lajittelu päivämäärän mukaan laskevaksi,Tarkastele viimeisimmät päivitetyt tiedostot kätevästi。
// @name:fr GitHub Trier par date
// @description:fr Changer le tri des fichiers en décroissant par date,Visualisez facilement les derniers fichiers mis à jour。
// @name:he GitHub מיין לפי תאריך
// @description:he שנה את מיון הקבצים ליורד לפי תאריך,צפה בנוחות בקבצים המעודכנים האחרונים。
// @name:hr GitHub Poredaj po datumu
// @description:hr Promijeni sortiranje datoteka na padajuće po datumu,Pogodan pregled najnovijih ažuriranih datoteka。
// @name:hu GitHub Rendezés dátum szerint
// @description:hu Módosítsa a fájlrendezést dátum szerint csökkenőre,Kényelmesen megtekintheti a legfrissebb fájlokat。
// @name:id GitHub Urutkan berdasarkan tanggal
// @description:id Ubah pengurutan file menjadi menurun berdasarkan tanggal,Lihat file terbaru yang diperbarui dengan mudah。
// @name:it GitHub Ordina per data
// @description:it Cambia l’ordinamento dei file in discendente per data,Visualizza comodamente gli ultimi file aggiornati。
// @name:ja GitHub 日付順に並べ替える
// @description:ja ファイルの並べ替えを日付順に変更します,最新の更新されたファイルを簡単に表示できます。
// @name:ka GitHub დალაგება თარიღის მიხედვით
// @description:ka შეცვალეთ ფაილის დახარისხება თარიღის მიხედვით კლებადობით,მოხერხებულად ნახეთ უახლესი განახლებული ფაილები。
// @name:ko GitHub 날짜순으로 정렬
// @description:ko 파일 정렬을 날짜별 내림차순으로 변경,최신 업데이트 파일을 편리하게 확인하세요。
// @name:nl GitHub Sorteer op datum
// @description:nl Wijzig de bestandssortering naar aflopend op datum,Bekijk handig de nieuwste bijgewerkte bestanden。
// @name:nb GitHub Sorter etter dato
// @description:nb Endre filsortering til synkende etter dato,Se praktisk på de siste oppdaterte filene。
// @name:pl GitHub Sortuj według daty
// @description:pl Zmień sortowanie plików na malejące według daty,Wygodnie przeglądaj najnowsze zaktualizowane pliki。
// @name:pt-BR GitHub Classificar por data
// @description:pt-BR Alterar a classificação dos arquivos para decrescente por data,Visualize convenientemente os arquivos atualizados mais recentes。
// @name:ro GitHub Sortați după dată
// @description:ro Schimbați sortarea fișierelor în descrescătoare după dată,Vizualizați în mod convenabil cele mai recente fișiere actualizate。
// @name:ru GitHub Сортировать по дате
// @description:ru Изменить сортировку файлов по убыванию по дате,Удобно просматривать последние обновленные файлы。
// @name:sk GitHub Zoradiť podľa dátumu
// @description:sk Zmeňte triedenie súborov na zostupné podľa dátumu,Pohodlne si prezerajte najnovšie aktualizované súbory。
// @name:sr GitHub Сортирај по датуму
// @description:sr Промените сортирање датотека на опадајуће по датуму,Погодно прегледајте најновије ажуриране датотеке。
// @name:sv GitHub Sortera efter datum
// @description:sv Ändra filsortering till fallande efter datum,Se bekvämt de senaste uppdaterade filerna。
// @name:th GitHub เรียงตามวันที่
// @description:th เปลี่ยนการเรียงลำดับไฟล์เป็นจากมากไปน้อยตามวันที่,ดูไฟล์ที่อัพเดตล่าสุดได้อย่างสะดวก。
// @name:tr GitHub Tarihe göre sırala
// @description:tr Dosya sıralamasını tarihe göre azalan olarak değiştirin,En son güncellenen dosyaları rahatça görüntüleyin。
// @name:ug GitHub چېسلا بويىچە تەرتىپلەش
// @description:ug ھۆججەت رەتلەشنى چېسلا بويىچە تۆۋەنگە ئۆزگەرتىڭ,ئەڭ يېڭى يېڭىلانغان ھۆججەتلەرنى قۇلايلىق كۆرۈڭ。
// @name:uk GitHub Сортувати за датою
// @description:uk Змінити сортування файлів на спадання за датою,Зручний перегляд останніх оновлених файлів。
// @name:vi GitHub Sắp xếp theo ngày
// @description:vi Thay đổi cách sắp xếp tệp thành giảm dần theo ngày,Thuận tiện xem các tập tin cập nhật mới nhất。
// @name:zh-TW GitHub 按日期排序
// @description:zh-TW 將文件排序方式改為日期降序,方便查看最新更新的文件。
// @name:zh-HK GitHub 按日期排序
// @description:zh-HK 將文件排序方式改為日期降序,方便查看最新更新的文件。
// @name:fr-CA GitHub Trier par date
// @description:fr-CA Changer le tri des fichiers en décroissant par date,Visualisez facilement les derniers fichiers mis à jour。
// @description Change the file sorting order to descending by date for easier viewing of the most recently updated files.
// @namespace https://github.com/ChinaGodMan/UserScripts
// @version 1.1.0.23
// @author @Androidcn ,人民的勤务员 <[email protected]>
// @match https://github.com/*
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAACXBIWXMAAAsTAAALEwEAmpwYAAAc6klEQVR4nO2deXBb13XGaTedTDxNp532j04z0yaTTpvpdGrLsjZLXAGCIPbtYd93ggRAkAC4kyK1y/JuybG1WJQsyZZsSd4X2dp3iqJkWd7kLXWdrWmcNMk0jWOfzrnAA+4FHkCIpCq55pv5hos4JPX9Ptx337nnXlZVzV6z1+w1e81es9fk100md2DU5An+3uQOfMK5fC/q7J40Z/P889fVvPom1T9VS9XtNc3a/TUy1UfVzerf18jUD6NXM/7DDA4fZ/GFweINEZk9QSKTJwicO/CWzukdUdr936v6f34tkun+vk6h66uTaS7VybVQK9dkJFMT1TSrobZZo5jxH8y5Ant58wsBoIzuABjd/i/0Du9xtdVtuiYpuI5XrVxfVyfX7qtX6D5H43kJAaiRqrbN6A+XSqPftHhC/1Xe/Iw4l59I7/B9oLM7W4aGhr5R9RW9amtrv1Ev1wcaFLr3G5Q6qFdkVMp8CsAv586d+6cz9ovoHD4TnX5bIAKRzj5whmMMAN58zunLSW/3fKK1OhPBYHDmfqFrfg3dXK/QWUVKPTFeyPyMNNCst4DBGYIGpSFjfrMaqqUquFMql83Yr2N0+7fR6Q/G0tC3bB1R19LV0NrZC7ZAaxEAQ1Z6hxc0dvcHSpNDV3WDXw1qtQaNF6n0gBICINEawegOgz/WBeFEH5HK6mYALG5SbZixX8rkCX5IA2jvGc4B6B25i6hn5C7yeU8kkYNAA0Dp7B7Q2lzH1FbXbVU32CXRWX4gUupfFqkMIGQ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XpDGubtKZflNJyRk/j0/VOrsPTO4WsPqiBI4nnABfWxK8rUliLELJmN81ufn4MQ+gwPxMohOkaw3HfjxcFdOtsnhAqrOS+8VCsbzoqVcQQE3jr26vEQ+VXNW6ntd8qfTPJVpjVKI1vnsjHKyxuMJ5f6myA2N+jfjK3FpJ9621tZOf/Xn9r6Gbm1ScvFHDbWnUcD+5VsfK1FQw9SwsOZd78Cosut1RJ/n0jnrJD+fWSBq/yn+i/aZGnXGxWKVfKVZzr4pVhl/cqOmfVy/5+by6phfm1TctnVstmf9VNr3sVa/RfF+s1BvrFbpUg1K3vk6he6ZeoRurV2g/qJNpf1Sv0H1WJ9P8bqbSv0gs++1CseyzRWLZR4tEzVcWiJvPzK9v3ju/Xnrf/HppYoFYpltQ2/Td6+3L7DV7zV6z1+xV9bW6/hcSd2EeG4WLWAAAAABJRU5ErkJggg==
// @iconbak https://www.google.com/s2/favicons?sz=64&domain=github.com
// @grant none
// @supportURL https://github.com/ChinaGodMan/UserScripts/issues
// @homepageURL https://github.com/ChinaGodMan/UserScripts
// @license MIT
// ==/UserScript==
(function () {
'use strict'
function createButton() {
// Create a button element
const button = document.createElement('button')
button.textContent = '排序'
button.style.position = 'fixed'
button.style.top = '60px'
button.style.right = '20px'
button.style.zIndex = '9999'
// Append the button to the body
document.body.appendChild(button)
// Add click event listener to the button
button.addEventListener('click', performSortedAction)
}
function waitForElement(selector) {
return new Promise((resolve) => {
const observer = new MutationObserver(() => {
if (document.querySelector(selector)) {
resolve()
observer.disconnect()
}
})
observer.observe(document.body, { childList: true, subtree: true })
})
}
function performSortedAction() {
var files = document.querySelector('[aria-labelledby="folders-and-files"] tbody')
var children = [...files.children]
files.replaceChildren(
children[0], ...[...files.querySelectorAll('.react-directory-row')].sort((a, b) => new Date(a.querySelector('relative-time').datetime) < new Date(b.querySelector('relative-time').datetime) ? 1 : -1), children.at(-1)
)
console.log('已按文件更新日期排序')
}
function WaitForRelativeTime() {
waitForElement('relative-time').then(() => {
performSortedAction()
})
}
// Wait for the page to load
window.addEventListener('load', WaitForRelativeTime)
})()