Skip to content

Commit f0d8017

Browse files
authored
Update IMDB for Scrolling (#2)
* Update IMDB for Scrolling * Update Prettier and Add Workflows
1 parent 933b9c3 commit f0d8017

File tree

12 files changed

+207
-33
lines changed

12 files changed

+207
-33
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ko_fi: cssnr

.github/workflows/labeler.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: "PR Labeler"
2+
3+
on:
4+
pull_request_target:
5+
6+
jobs:
7+
labeler:
8+
name: "Labeler"
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 5
11+
12+
permissions:
13+
pull-requests: write
14+
issues: write
15+
16+
steps:
17+
- name: "Checkout Configs"
18+
uses: actions/checkout@v5
19+
with:
20+
repository: cssnr/configs
21+
ref: master
22+
path: .configs
23+
sparse-checkout-cone-mode: false
24+
sparse-checkout: |
25+
labels/**
26+
27+
- name: "Debug"
28+
continue-on-error: true
29+
run: |
30+
echo "::group::labels.yaml"
31+
cat .configs/labels/labels.yaml
32+
echo "::endgroup::"
33+
34+
echo "::group::labeler.yaml"
35+
cat .configs/labels/labeler.yaml
36+
echo "::endgroup::"
37+
38+
- name: "Label Creator"
39+
continue-on-error: true
40+
uses: cssnr/label-creator-action@v1
41+
with:
42+
file: .configs/labels/labels.yaml
43+
44+
- name: "Labeler"
45+
uses: actions/labeler@v6
46+
with:
47+
sync-labels: true
48+
configuration-path: .configs/labels/labeler.yaml

.github/workflows/lint.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: "Lint"
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches: [master]
7+
push:
8+
branches: [master]
9+
10+
jobs:
11+
lint:
12+
name: "Lint"
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 5
15+
if: ${{ !contains(github.event.head_commit.message, '#nolint') }}
16+
17+
steps:
18+
- name: "Checkout"
19+
uses: actions/checkout@v5
20+
21+
- name: "Prettier"
22+
if: ${{ !cancelled() }}
23+
run: |
24+
echo "::group::Install"
25+
npm install prettier
26+
echo "::endgroup::"
27+
npx prettier --check .
28+
29+
- name: "Yamllint"
30+
if: ${{ !cancelled() }}
31+
env:
32+
CONFIG: "{extends: relaxed, ignore: [node_modules/], rules: {line-length: {max: 119}}}"
33+
run: |
34+
echo "::group::List Files"
35+
yamllint -d '${{ env.CONFIG }}' --list-files .
36+
echo "::endgroup::"
37+
yamllint -d '${{ env.CONFIG }}' .
38+
39+
- name: "Actionlint"
40+
if: ${{ !cancelled() }}
41+
run: |
42+
echo "::group::Download"
43+
loc=$(curl -sI https://github.com/rhysd/actionlint/releases/latest | grep -i '^location:')
44+
echo "loc: ${loc}"
45+
tag=$(echo "${loc}" | sed -E 's|.*/tag/v?(.*)|\1|' | tr -d '\t\r\n')
46+
echo "tag: ${tag}"
47+
url="https://github.com/rhysd/actionlint/releases/latest/download/actionlint_${tag}_linux_amd64.tar.gz"
48+
echo "url: ${url}"
49+
curl -sL "${url}" | tar xz -C "${RUNNER_TEMP}" actionlint
50+
file "${RUNNER_TEMP}/actionlint"
51+
"${RUNNER_TEMP}/actionlint" --version
52+
echo "::endgroup::"
53+
"${RUNNER_TEMP}/actionlint" -color -verbose -shellcheck= -pyflakes=

.prettierignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# IDE
2+
.idea/
3+
.vscode/
4+
5+
# Tools
6+
.ruff_cache/
7+
.mypy_cache/
8+
.pytest_cache/
9+
eslint_report.json
10+
11+
# Build
12+
dist/
13+
node_modules/
14+
.github/disabled/
15+
16+
# Files
17+
.github/pull_request_template.md

.prettierrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"trailingComma": "es5",
33
"semi": false,
44
"singleQuote": true,
5+
"printWidth": 90,
56
"overrides": [
67
{
78
"files": ["**/*.html", "**/*.yaml", "**/*.yml"],
@@ -10,7 +11,7 @@
1011
}
1112
},
1213
{
13-
"files": ["**/*.js"],
14+
"files": ["**/*.js", "**/*.mjs", "**/*.css", "**/*.scss"],
1415
"options": {
1516
"tabWidth": 4
1617
}

README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
[![GitHub Last Commit](https://img.shields.io/github/last-commit/cssnr/browser-scripts?logo=github&logoColor=white&label=updated)](https://github.com/cssnr/browser-scripts/graphs/commit-activity)
2-
[![GitHub Top Language](https://img.shields.io/github/languages/top/cssnr/browser-scripts?logo=htmx&logoColor=white)](https://github.com/cssnr/browser-scripts)
3-
[![GitHub Org Stars](https://img.shields.io/github/stars/cssnr?style=flat&logo=github&logoColor=white&label=org%20stars)](https://cssnr.github.io/)
1+
[![GitHub Last Commit](https://img.shields.io/github/last-commit/cssnr/browser-scripts?logo=github&label=updated)](https://github.com/cssnr/browser-scripts/pulse)
2+
[![GitHub Contributors](https://img.shields.io/github/contributors-anon/cssnr/browser-scripts?logo=github)](https://github.com/cssnr/browser-scripts/graphs/contributors)
3+
[![GitHub Repo Size](https://img.shields.io/github/repo-size/cssnr/browser-scripts?logo=bookstack&logoColor=white&label=repo%20size)](https://github.com/cssnr/browser-scripts?tab=readme-ov-file#readme)
4+
[![GitHub Top Language](https://img.shields.io/github/languages/top/cssnr/browser-scripts?logo=htmx)](https://github.com/cssnr/browser-scripts/tree/master/src)
5+
[![GitHub Discussions](https://img.shields.io/github/discussions/cssnr/browser-scripts?logo=github)](https://github.com/cssnr/browser-scripts/discussions)
6+
[![GitHub Forks](https://img.shields.io/github/forks/cssnr/browser-scripts?style=flat&logo=github)](https://github.com/cssnr/browser-scripts/forks)
7+
[![GitHub Repo Stars](https://img.shields.io/github/stars/cssnr/browser-scripts?style=flat&logo=github)](https://github.com/cssnr/browser-scripts/stargazers)
8+
[![GitHub Org Stars](https://img.shields.io/github/stars/cssnr?style=flat&logo=github&label=org%20stars)](https://cssnr.github.io/)
49
[![Discord](https://img.shields.io/discord/899171661457293343?logo=discord&logoColor=white&label=discord&color=7289da)](https://discord.gg/wXy6m2X8wY)
10+
[![Ko-fi](https://img.shields.io/badge/Ko--fi-72a5f2?logo=kofi&label=support)](https://ko-fi.com/cssnr)
511

612
# Browser Scripts
713

8-
## Table of Contents
9-
1014
- [Overview](#overview)
1115
- [Requirements](#requirements)
1216
- [User Scripts](#user-scripts)
@@ -45,12 +49,12 @@ User Styles (css) require a browser addon to manage such as Stylus.
4549

4650
## Discord Plugins
4751

48-
| Name | Description |
49-
| ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- |
50-
| [Bypass Link Warning](https://raw.githubusercontent.com/cssnr/browser-scripts/master/discord/BypassLinkWarning.plugin.js) | Bypass Discord Leaving Site Warning on Links |
52+
| Name | Description |
53+
| ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
54+
| [Bypass Link Warning](https://raw.githubusercontent.com/cssnr/browser-scripts/master/discord/BypassLinkWarning.plugin.js) | MOVED TO: [smashedr/bypass-links-dialog](https://github.com/smashedr/bypass-links-dialog) |
5155

52-
> [!IMPORTANT]
53-
> These are not user scripts, they are Discord scripts and require [Better Discord](https://betterdiscord.app/).
56+
> [!WARNING]
57+
> This has moved here: https://github.com/smashedr/bypass-links-dialog
5458
5559
---
5660

asn/asn.user.css

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,53 @@
1010
body {
1111
background: #848484;
1212
}
13-
td.list, th.list, th.defaultheader, th.updates, td.listmain, td.listmain_nohover, .infobox_highlight, td.listdata {
13+
td.list,
14+
th.list,
15+
th.defaultheader,
16+
th.updates,
17+
td.listmain,
18+
td.listmain_nohover,
19+
.infobox_highlight,
20+
td.listdata {
1421
color: white;
15-
border-top: 1px solid #FFF;
16-
border-bottom: 1px solid #FFF;
22+
border-top: 1px solid #fff;
23+
border-bottom: 1px solid #fff;
1724
}
18-
body, div.pagenumbers a, .navigation a:link, label, td.listnoline {
25+
body,
26+
div.pagenumbers a,
27+
.navigation a:link,
28+
label,
29+
td.listnoline {
1930
color: white;
2031
}
2132
.infobox {
2233
background-color: #222;
2334
}
24-
table, #page-wrap, .navigation, .navigation ul li, table tr.listmain td {
35+
table,
36+
#page-wrap,
37+
.navigation,
38+
.navigation ul li,
39+
table tr.listmain td {
2540
background-color: #313131;
2641
}
27-
table tr.list:hover td, table tr:hover td.list, td.listdata:hover, tbody tr:hover td.listdata {
28-
background-color:#474747
42+
table tr.list:hover td,
43+
table tr:hover td.list,
44+
td.listdata:hover,
45+
tbody tr:hover td.listdata {
46+
background-color: #474747;
2947
}
3048
a {
3149
color: #0f0;
3250
}
33-
a:visited, .trail a:link, .trail a:visited, div.alertbox a {
51+
a:visited,
52+
.trail a:link,
53+
.trail a:visited,
54+
div.alertbox a {
3455
color: #f0f;
3556
}
36-
div.navigation img, div.alertbox, div#noprint {
57+
div.navigation img,
58+
div.alertbox,
59+
div#noprint {
3760
display: none;
3861
}
3962
/*

asn/asn.user.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313

1414
window.addEventListener('load', () => {
1515
highlightTableRows()
16-
if (
17-
document.URL.includes('/wikibase/') ||
18-
document.URL.includes('/database/')
19-
) {
16+
if (document.URL.includes('/wikibase/') || document.URL.includes('/database/')) {
2017
updateEntryTable()
2118
updateLastUpdated()
2219
}

eslint.config.mjs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import js from '@eslint/js'
2+
3+
export default [
4+
js.configs.recommended,
5+
{
6+
languageOptions: {
7+
ecmaVersion: 'latest',
8+
sourceType: 'module',
9+
},
10+
settings: {
11+
env: {
12+
node: true,
13+
es2021: true,
14+
},
15+
},
16+
rules: {
17+
'no-undef': 'off',
18+
'no-extra-semi': 'off',
19+
},
20+
},
21+
]

faa/faa.user.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
// ==/UserScript==
1212

1313
window.addEventListener('load', () => {
14-
let element = document.querySelector(
15-
'[data-label="Mode S Code (Base 16 / Hex)"]'
16-
)
14+
let element = document.querySelector('[data-label="Mode S Code (Base 16 / Hex)"]')
1715
if (element) {
1816
const hex = element.textContent
1917
const link = document.createElement('a')

0 commit comments

Comments
 (0)