Skip to content

Commit ba4943e

Browse files
committed
Update CSS for new React GitHub layouts.
1 parent 32a42a8 commit ba4943e

File tree

8 files changed

+74
-59
lines changed

8 files changed

+74
-59
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2013-2023 xthexder (https://github.com/xthexder/wide-github)
3+
Copyright (c) 2013-2024 xthexder (https://github.com/xthexder/wide-github)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

build/wide-github.user.css

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,55 +3,60 @@
33
@namespace https://github.com/xthexder/wide-github
44
@description Change all GitHub repository and gist pages to be full width and dynamically sized.
55
@author xthexder
6-
@copyright 2013-2023, xthexder (https://github.com/xthexder)
6+
@copyright 2013-2024, xthexder (https://github.com/xthexder)
77
@contributor Jason Frey (https://github.com/Fryguy)
88
@contributor Marti Martz (https://github.com/Martii)
99
@contributor Paul "Joey" Clark (https://github.com/joeytwiddle)
1010
@contributor Robert Laverty (https://github.com/roblav96)
1111
@contributor Amir Meimari (https://github.com/amirmeimari)
1212
@license MIT; https://raw.githubusercontent.com/xthexder/wide-github/master/LICENSE
13-
@version 1.6.5
13+
@version 1.6.6
1414
@homepageURL https://github.com/xthexder/wide-github
1515
@supportURL https://github.com/xthexder/wide-github/issues
1616
==/UserStyle== */
1717

1818
@-moz-document regexp("^https://(?:gist\\.)?github\\.com/.*") {
1919

20+
/* General full-page container */
2021
body:not(.wgh-disabled) .application-main .container-xl {
2122
max-width: none !important;
2223
}
24+
/* General content sub-container */
2325
body:not(.wgh-disabled) .application-main .container-lg {
2426
max-width: none !important;
2527
margin-left: 0px !important;
2628
}
2729

28-
/* New github repository react divs (2023) */
30+
/* Repository home sidebar */
2931
body:not(.wgh-disabled) .react-repos-overview-margin {
3032
margin-right: 0;
3133
}
32-
body:not(.wgh-disabled) .Layout-main div[style="--sticky-pane-height: 100vh;"] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-']:nth-child(2) {
33-
max-width: none;
34-
}
35-
/* Alternative match for above to handle JS-loaded vs full refresh pages */
36-
body:not(.wgh-disabled) .Layout-main div[style="--sticky-pane-height:100vh"] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-']:nth-child(2) {
37-
max-width: none;
38-
}
39-
body:not(.wgh-disabled) .Layout-main div[data-selector="repos-split-pane-content"] {
40-
max-width: none;
41-
}
4234

43-
/* Commit History page */
44-
body:not(.wgh-disabled) #js-repo-pjax-container div[style="--sticky-pane-height: 100vh;"] > div[class^='Box-sc-']:first-child {
35+
/* Commit History and Branches page */
36+
body:not(.wgh-disabled) #js-repo-pjax-container div[style^="--sticky-pane-height:"] > div[class^='Box-sc-']:first-child {
4537
max-width: none;
4638
}
47-
/* Your Branches page */
48-
body:not(.wgh-disabled) #js-repo-pjax-container div[style="--sticky-pane-height:100vh"] > div[class^='Box-sc-']:first-child {
49-
max-width: none;
39+
40+
/* Repository Tags page */
41+
body:not(.wgh-disabled) .application-main .col-11 {
42+
width: 100%;
5043
}
5144

5245
/* Issue list Assignee alignment */
5346
body:not(.wgh-disabled) #js-repo-pjax-container .js-issue-row .text-right {
5447
max-width: 303px !important;
5548
}
5649

50+
/* New React layout (2024) */
51+
52+
/* Issues list page */
53+
body:not(.wgh-disabled) .application-main div[style^="--sticky-pane-height:"] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-']:nth-child(2) > div[class^='Box-sc-'] {
54+
max-width: none;
55+
}
56+
57+
/* Issue page */
58+
body:not(.wgh-disabled) #js-repo-pjax-container div[data-target="react-app.reactRoot"] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-'] {
59+
max-width: none;
60+
}
61+
5762
}

build/wide-github.user.js

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
// @namespace https://github.com/xthexder/wide-github
66
// @description Change all GitHub repository and gist pages to be full width and dynamically sized.
77
// @author xthexder
8-
// @copyright 2013-2023, xthexder (https://github.com/xthexder)
8+
// @copyright 2013-2024, xthexder (https://github.com/xthexder)
99
// @contributor Jason Frey (https://github.com/Fryguy)
1010
// @contributor Marti Martz (https://github.com/Martii)
1111
// @contributor Paul "Joey" Clark (https://github.com/joeytwiddle)
1212
// @contributor Robert Laverty (https://github.com/roblav96)
1313
// @contributor Amir Meimari (https://github.com/amirmeimari)
1414
// @license MIT; https://raw.githubusercontent.com/xthexder/wide-github/master/LICENSE
15-
// @version 1.6.5
15+
// @version 1.6.6
1616
// @icon https://raw.githubusercontent.com/xthexder/wide-github/master/icons/icon.png
1717
// @homepageURL https://github.com/xthexder/wide-github
1818
// @supportURL https://github.com/xthexder/wide-github/issues
@@ -22,43 +22,48 @@
2222
// ==/UserScript==
2323

2424
var styleSheet = "" +
25+
// General full-page container
2526
"body:not(.wgh-disabled) .application-main .container-xl {" +
2627
"max-width: none !important;" +
2728
"}" +
29+
// General content sub-container
2830
"body:not(.wgh-disabled) .application-main .container-lg {" +
2931
"max-width: none !important;" +
3032
"margin-left: 0px !important;" +
3133
"}" +
3234

33-
// New github repository react divs (2023)
35+
// Repository home sidebar
3436
"body:not(.wgh-disabled) .react-repos-overview-margin {" +
3537
"margin-right: 0;" +
3638
"}" +
37-
"body:not(.wgh-disabled) .Layout-main div[style=\"--sticky-pane-height: 100vh;\"] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-']:nth-child(2) {" +
38-
"max-width: none;" +
39-
"}" +
40-
// Alternative match for above to handle JS-loaded vs full refresh pages
41-
"body:not(.wgh-disabled) .Layout-main div[style=\"--sticky-pane-height:100vh\"] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-']:nth-child(2) {" +
42-
"max-width: none;" +
43-
"}" +
44-
"body:not(.wgh-disabled) .Layout-main div[data-selector=\"repos-split-pane-content\"] {" +
45-
"max-width: none;" +
46-
"}" +
4739

48-
// Commit History page
49-
"body:not(.wgh-disabled) #js-repo-pjax-container div[style=\"--sticky-pane-height: 100vh;\"] > div[class^='Box-sc-']:first-child {" +
40+
// Commit History and Branches page
41+
"body:not(.wgh-disabled) #js-repo-pjax-container div[style^=\"--sticky-pane-height:\"] > div[class^='Box-sc-']:first-child {" +
5042
"max-width: none;" +
5143
"}" +
52-
// Your Branches page
53-
"body:not(.wgh-disabled) #js-repo-pjax-container div[style=\"--sticky-pane-height:100vh\"] > div[class^='Box-sc-']:first-child {" +
54-
"max-width: none;" +
44+
45+
// Repository Tags page
46+
"body:not(.wgh-disabled) .application-main .col-11 {" +
47+
"width: 100%;" +
5548
"}" +
5649

5750
// Issue list Assignee alignment
5851
"body:not(.wgh-disabled) #js-repo-pjax-container .js-issue-row .text-right {" +
5952
"max-width: 303px !important;" +
6053
"}" +
6154

55+
// New React layout (2024)
56+
57+
// Issues list page
58+
"body:not(.wgh-disabled) .application-main div[style^=\"--sticky-pane-height:\"] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-']:nth-child(2) > div[class^='Box-sc-'] {" +
59+
"max-width: none;" +
60+
"}" +
61+
62+
// Issue page
63+
"body:not(.wgh-disabled) #js-repo-pjax-container div[data-target=\"react-app.reactRoot\"] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-'] {" +
64+
"max-width: none;" +
65+
"}" +
66+
6267
"";
6368

6469
(function () {

chrome/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
"name": "Wide GitHub",
55
"description": "Change all GitHub repository and gist pages to be full width and dynamically sized.",
6-
"version": "1.6.5",
7-
"version_name": "1.6.5 MV3",
6+
"version": "1.6.6",
7+
"version_name": "1.6.6 MV3",
88
"icons": {
99
"32": "icons/icon32.png",
1010
"48": "icons/icon48.png",

makecss.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var header = "" +
1010
"@namespace https://github.com/xthexder/wide-github\n" +
1111
"@description " + manifest["description"] + "\n" +
1212
"@author xthexder\n" +
13-
"@copyright 2013-2023, xthexder (https://github.com/xthexder)\n" +
13+
"@copyright 2013-2024, xthexder (https://github.com/xthexder)\n" +
1414
"@contributor Jason Frey (https://github.com/Fryguy)\n" +
1515
"@contributor Marti Martz (https://github.com/Martii)\n" +
1616
"@contributor Paul \"Joey\" Clark (https://github.com/joeytwiddle)\n" +

makejs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var header = "" +
1212
"// @namespace https://github.com/xthexder/wide-github\n" +
1313
"// @description " + manifest["description"] + "\n" +
1414
"// @author xthexder\n" +
15-
"// @copyright 2013-2023, xthexder (https://github.com/xthexder)\n" +
15+
"// @copyright 2013-2024, xthexder (https://github.com/xthexder)\n" +
1616
"// @contributor Jason Frey (https://github.com/Fryguy)\n" +
1717
"// @contributor Marti Martz (https://github.com/Martii)\n" +
1818
"// @contributor Paul \"Joey\" Clark (https://github.com/joeytwiddle)\n" +
@@ -51,7 +51,7 @@ for (var i = 0; i < lines.length; i++) {
5151
if (lines[i] !== "") {
5252
lines[i] = lines[i].replace(/"/g, "\\\"");
5353
lines[i] = lines[i].replace(/^( *)([^\/])/, "$1\"$2");
54-
if (!lines[i].match(/^ *\/\*/)) lines[i] = lines[i].replace(/( *\/\*[^\*]*\*\/)?$/, "\" +$1");
54+
if (!lines[i].match(/^ *(\/\*|.*\*\/$)/)) lines[i] = lines[i].replace(/( *\/\*[^\*]*\*\/)?$/, "\" +$1");
5555
lines[i] = lines[i].replace(/\/\*(.*)\*\/$/, "//$1").replace(/ +$/, "");
5656
output += lines[i];
5757
}

mozilla/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
"name": "Wide GitHub",
55
"description": "Change all GitHub repository and gist pages to be full width and dynamically sized.",
6-
"version": "1.6.5",
6+
"version": "1.6.6",
77
"icons": {
88
"32": "icons/icon32.png",
99
"48": "icons/icon48.png",

wide-github.css

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,41 @@
1+
/* General full-page container */
12
body:not(.wgh-disabled) .application-main .container-xl {
23
max-width: none !important;
34
}
5+
/* General content sub-container */
46
body:not(.wgh-disabled) .application-main .container-lg {
57
max-width: none !important;
68
margin-left: 0px !important;
79
}
810

9-
/* New github repository react divs (2023) */
11+
/* Repository home sidebar */
1012
body:not(.wgh-disabled) .react-repos-overview-margin {
1113
margin-right: 0;
1214
}
13-
body:not(.wgh-disabled) .Layout-main div[style="--sticky-pane-height: 100vh;"] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-']:nth-child(2) {
14-
max-width: none;
15-
}
16-
/* Alternative match for above to handle JS-loaded vs full refresh pages */
17-
body:not(.wgh-disabled) .Layout-main div[style="--sticky-pane-height:100vh"] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-']:nth-child(2) {
18-
max-width: none;
19-
}
20-
body:not(.wgh-disabled) .Layout-main div[data-selector="repos-split-pane-content"] {
21-
max-width: none;
22-
}
2315

24-
/* Commit History page */
25-
body:not(.wgh-disabled) #js-repo-pjax-container div[style="--sticky-pane-height: 100vh;"] > div[class^='Box-sc-']:first-child {
16+
/* Commit History and Branches page */
17+
body:not(.wgh-disabled) #js-repo-pjax-container div[style^="--sticky-pane-height:"] > div[class^='Box-sc-']:first-child {
2618
max-width: none;
2719
}
28-
/* Your Branches page */
29-
body:not(.wgh-disabled) #js-repo-pjax-container div[style="--sticky-pane-height:100vh"] > div[class^='Box-sc-']:first-child {
30-
max-width: none;
20+
21+
/* Repository Tags page */
22+
body:not(.wgh-disabled) .application-main .col-11 {
23+
width: 100%;
3124
}
3225

3326
/* Issue list Assignee alignment */
3427
body:not(.wgh-disabled) #js-repo-pjax-container .js-issue-row .text-right {
3528
max-width: 303px !important;
3629
}
30+
31+
/* New React layout (2024) */
32+
33+
/* Issues list page */
34+
body:not(.wgh-disabled) .application-main div[style^="--sticky-pane-height:"] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-']:nth-child(2) > div[class^='Box-sc-'] {
35+
max-width: none;
36+
}
37+
38+
/* Issue page */
39+
body:not(.wgh-disabled) #js-repo-pjax-container div[data-target="react-app.reactRoot"] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-'] > div[class^='Box-sc-'] {
40+
max-width: none;
41+
}

0 commit comments

Comments
 (0)