Skip to content

Commit 004ecd8

Browse files
authored
Set maximum width on more pages (#15)
1 parent 5f92b52 commit 004ecd8

File tree

3 files changed

+29
-9
lines changed

3 files changed

+29
-9
lines changed

src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"name": "GitHub Center",
55
"author": "Katsute",
66
"description": "Center navigation on large viewports",
7-
"version": "1.1",
7+
"version": "2.0",
88
"homepage_url": "https://github.com/KatsuteDev/GitHub-Center",
99
"icons": {
1010
"16": "icon16.png",

src/style.css

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
/* Copyright (C) 2024 Katsute <https://github.com/Katsute> */
22

33
.AppHeader > div,
4+
body:not(.project-page) .application-main:not(:has(> div > projects-v2, > div > .feed-background)),
45
#repository-container-header,
5-
body:not(.project-page, .full-width) #repo-content-turbo-frame > div:not(:has(> react-app[app-name="react-code-view"])) {
6+
#js-repo-pjax-container:not(:has(> projects-v2)),
7+
body:not(.project-page) #repo-content-turbo-frame > div {
68

79
width: 100%;
810
max-width: 1280px;
@@ -11,15 +13,16 @@ body:not(.project-page, .full-width) #repo-content-turbo-frame > div:not(:has(>
1113

1214
}
1315

14-
#repository-container-header > .container-xl,
15-
#repo-content-turbo-frame .container-xl {
16+
#repository-container-header > div,
17+
#repo-content-pjax-container > div,
18+
body:not(.project-page) #repo-content-turbo-frame > div:not(#repo-content-pjax-container) {
1619

1720
padding-left: 16px !important;
1821
padding-right: 16px !important;
1922

2023
}
2124

22-
#repository-container-header > .container-xl > .border-bottom {
25+
#repository-container-header > div:last-child > div:last-child {
2326

2427
margin: 0 !important;
2528

test.js

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@ const URL = "https://github.com/KatsuteDev/GitHub-Center";
44

55
const selectors = [
66
// `.AppHeader > div`, // requires login
7+
`body:not(.project-page) .application-main:not(:has(> div > projects-v2, > div > .feed-background))`,
78
`#repository-container-header`,
8-
`body:not(.project-page, .full-width) #repo-content-turbo-frame > div:not(:has(> react-app[app-name="react-code-view"]))`,
9-
// `#repository-container-header > .container-xl`, // requires login
10-
`#repo-content-turbo-frame .container-xl`,
11-
// `#repository-container-header > .container-xl > .border-bottom`, // requires login
9+
`#js-repo-pjax-container:not(:has(> projects-v2))`,
10+
`body:not(.project-page) #repo-content-turbo-frame > div`,
11+
12+
`#repository-container-header > div`,
13+
`#repo-content-pjax-container > div`,
14+
// `body:not(.project-page) #repo-content-turbo-frame > div:not(#repo-content-pjax-container)`, // uses turbo test case
15+
16+
// `#repository-container-header > div:last-child > div:last-child` // requires login
1217
];
1318

1419
(async () => {
@@ -27,6 +32,18 @@ const selectors = [
2732
}
2833
}
2934

35+
{
36+
const s = `body:not(.project-page) #repo-content-turbo-frame > div:not(#repo-content-pjax-container)`;
37+
try{ // test for turbo frame
38+
await page.click(`#issues-tab`);
39+
await page.waitForSelector(s, { timeout: 5000 });
40+
console.info('✅', s);
41+
}catch(e){
42+
console.error('❌', s);
43+
failed = true;
44+
}
45+
}
46+
3047
await browser.close();
3148

3249
failed && process.exit(1);

0 commit comments

Comments
 (0)