Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ko_fi: cssnr
48 changes: 48 additions & 0 deletions .github/workflows/labeler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "PR Labeler"

on:
pull_request_target:

jobs:
labeler:
name: "Labeler"
runs-on: ubuntu-latest
timeout-minutes: 5

permissions:
pull-requests: write
issues: write

steps:
- name: "Checkout Configs"
uses: actions/checkout@v5
with:
repository: cssnr/configs
ref: master
path: .configs
sparse-checkout-cone-mode: false
sparse-checkout: |
labels/**

- name: "Debug"
continue-on-error: true
run: |
echo "::group::labels.yaml"
cat .configs/labels/labels.yaml
echo "::endgroup::"

echo "::group::labeler.yaml"
cat .configs/labels/labeler.yaml
echo "::endgroup::"

- name: "Label Creator"
continue-on-error: true
uses: cssnr/label-creator-action@v1
with:
file: .configs/labels/labels.yaml

- name: "Labeler"
uses: actions/labeler@v6
with:
sync-labels: true
configuration-path: .configs/labels/labeler.yaml
53 changes: 53 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: "Lint"

on:
workflow_dispatch:
pull_request:
branches: [master]
push:
branches: [master]

jobs:
lint:
name: "Lint"
runs-on: ubuntu-latest
timeout-minutes: 5
if: ${{ !contains(github.event.head_commit.message, '#nolint') }}

steps:
- name: "Checkout"
uses: actions/checkout@v5

- name: "Prettier"
if: ${{ !cancelled() }}
run: |
echo "::group::Install"
npm install prettier
echo "::endgroup::"
npx prettier --check .

- name: "Yamllint"
if: ${{ !cancelled() }}
env:
CONFIG: "{extends: relaxed, ignore: [node_modules/], rules: {line-length: {max: 119}}}"
run: |
echo "::group::List Files"
yamllint -d '${{ env.CONFIG }}' --list-files .
echo "::endgroup::"
yamllint -d '${{ env.CONFIG }}' .

- name: "Actionlint"
if: ${{ !cancelled() }}
run: |
echo "::group::Download"
loc=$(curl -sI https://github.com/rhysd/actionlint/releases/latest | grep -i '^location:')
echo "loc: ${loc}"
tag=$(echo "${loc}" | sed -E 's|.*/tag/v?(.*)|\1|' | tr -d '\t\r\n')
echo "tag: ${tag}"
url="https://github.com/rhysd/actionlint/releases/latest/download/actionlint_${tag}_linux_amd64.tar.gz"
echo "url: ${url}"
curl -sL "${url}" | tar xz -C "${RUNNER_TEMP}" actionlint
file "${RUNNER_TEMP}/actionlint"
"${RUNNER_TEMP}/actionlint" --version
echo "::endgroup::"
"${RUNNER_TEMP}/actionlint" -color -verbose -shellcheck= -pyflakes=
17 changes: 17 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# IDE
.idea/
.vscode/

# Tools
.ruff_cache/
.mypy_cache/
.pytest_cache/
eslint_report.json

# Build
dist/
node_modules/
.github/disabled/

# Files
.github/pull_request_template.md
3 changes: 2 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"trailingComma": "es5",
"semi": false,
"singleQuote": true,
"printWidth": 90,
"overrides": [
{
"files": ["**/*.html", "**/*.yaml", "**/*.yml"],
Expand All @@ -10,7 +11,7 @@
}
},
{
"files": ["**/*.js"],
"files": ["**/*.js", "**/*.mjs", "**/*.css", "**/*.scss"],
"options": {
"tabWidth": 4
}
Expand Down
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
[![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)
[![GitHub Top Language](https://img.shields.io/github/languages/top/cssnr/browser-scripts?logo=htmx&logoColor=white)](https://github.com/cssnr/browser-scripts)
[![GitHub Org Stars](https://img.shields.io/github/stars/cssnr?style=flat&logo=github&logoColor=white&label=org%20stars)](https://cssnr.github.io/)
[![GitHub Last Commit](https://img.shields.io/github/last-commit/cssnr/browser-scripts?logo=github&label=updated)](https://github.com/cssnr/browser-scripts/pulse)
[![GitHub Contributors](https://img.shields.io/github/contributors-anon/cssnr/browser-scripts?logo=github)](https://github.com/cssnr/browser-scripts/graphs/contributors)
[![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)
[![GitHub Top Language](https://img.shields.io/github/languages/top/cssnr/browser-scripts?logo=htmx)](https://github.com/cssnr/browser-scripts/tree/master/src)
[![GitHub Discussions](https://img.shields.io/github/discussions/cssnr/browser-scripts?logo=github)](https://github.com/cssnr/browser-scripts/discussions)
[![GitHub Forks](https://img.shields.io/github/forks/cssnr/browser-scripts?style=flat&logo=github)](https://github.com/cssnr/browser-scripts/forks)
[![GitHub Repo Stars](https://img.shields.io/github/stars/cssnr/browser-scripts?style=flat&logo=github)](https://github.com/cssnr/browser-scripts/stargazers)
[![GitHub Org Stars](https://img.shields.io/github/stars/cssnr?style=flat&logo=github&label=org%20stars)](https://cssnr.github.io/)
[![Discord](https://img.shields.io/discord/899171661457293343?logo=discord&logoColor=white&label=discord&color=7289da)](https://discord.gg/wXy6m2X8wY)
[![Ko-fi](https://img.shields.io/badge/Ko--fi-72a5f2?logo=kofi&label=support)](https://ko-fi.com/cssnr)

# Browser Scripts

## Table of Contents

- [Overview](#overview)
- [Requirements](#requirements)
- [User Scripts](#user-scripts)
Expand Down Expand Up @@ -45,12 +49,12 @@ User Styles (css) require a browser addon to manage such as Stylus.

## Discord Plugins

| Name | Description |
| ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- |
| [Bypass Link Warning](https://raw.githubusercontent.com/cssnr/browser-scripts/master/discord/BypassLinkWarning.plugin.js) | Bypass Discord Leaving Site Warning on Links |
| Name | Description |
| ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| [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) |

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

---

Expand Down
41 changes: 32 additions & 9 deletions asn/asn.user.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,53 @@
body {
background: #848484;
}
td.list, th.list, th.defaultheader, th.updates, td.listmain, td.listmain_nohover, .infobox_highlight, td.listdata {
td.list,
th.list,
th.defaultheader,
th.updates,
td.listmain,
td.listmain_nohover,
.infobox_highlight,
td.listdata {
color: white;
border-top: 1px solid #FFF;
border-bottom: 1px solid #FFF;
border-top: 1px solid #fff;
border-bottom: 1px solid #fff;
}
body, div.pagenumbers a, .navigation a:link, label, td.listnoline {
body,
div.pagenumbers a,
.navigation a:link,
label,
td.listnoline {
color: white;
}
.infobox {
background-color: #222;
}
table, #page-wrap, .navigation, .navigation ul li, table tr.listmain td {
table,
#page-wrap,
.navigation,
.navigation ul li,
table tr.listmain td {
background-color: #313131;
}
table tr.list:hover td, table tr:hover td.list, td.listdata:hover, tbody tr:hover td.listdata {
background-color:#474747
table tr.list:hover td,
table tr:hover td.list,
td.listdata:hover,
tbody tr:hover td.listdata {
background-color: #474747;
}
a {
color: #0f0;
}
a:visited, .trail a:link, .trail a:visited, div.alertbox a {
a:visited,
.trail a:link,
.trail a:visited,
div.alertbox a {
color: #f0f;
}
div.navigation img, div.alertbox, div#noprint {
div.navigation img,
div.alertbox,
div#noprint {
display: none;
}
/*
Expand Down
5 changes: 1 addition & 4 deletions asn/asn.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@

window.addEventListener('load', () => {
highlightTableRows()
if (
document.URL.includes('/wikibase/') ||
document.URL.includes('/database/')
) {
if (document.URL.includes('/wikibase/') || document.URL.includes('/database/')) {
updateEntryTable()
updateLastUpdated()
}
Expand Down
21 changes: 21 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import js from '@eslint/js'

export default [
js.configs.recommended,
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
settings: {
env: {
node: true,
es2021: true,
},
},
rules: {
'no-undef': 'off',
'no-extra-semi': 'off',
},
},
]
4 changes: 1 addition & 3 deletions faa/faa.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
// ==/UserScript==

window.addEventListener('load', () => {
let element = document.querySelector(
'[data-label="Mode S Code (Base 16 / Hex)"]'
)
let element = document.querySelector('[data-label="Mode S Code (Base 16 / Hex)"]')
if (element) {
const hex = element.textContent
const link = document.createElement('a')
Expand Down
20 changes: 16 additions & 4 deletions imdb/imdb-show-all.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name IMDb Auto Show All
// @description Automatically show all titles for actors.
// @version 20240521
// @version 20250112
// @author shane
// @namespace https://github.com/cssnr/browser-scripts
// @updateURL https://github.com/cssnr/browser-scripts/raw/master/imdb/imdb-show-all.user.js
Expand All @@ -12,7 +12,19 @@
// ==/UserScript==

window.addEventListener('load', () => {
let showMore = document.querySelector('.ipc-see-more__button')
console.info('Activating See all...')
showMore?.click()
const showMore = document.querySelector('.ipc-see-more__button')
if (!showMore) return

const observer = new IntersectionObserver(
(entries) => {
if (entries[0].isIntersecting) {
observer.disconnect()
console.info('Clicking See all...')
showMore.click()
}
},
{ threshold: 1.0 }
)

observer.observe(showMore)
})
3 changes: 1 addition & 2 deletions simpleflying/simpleflying.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ window.addEventListener('load', () => {
// console.log(`${name}: ${value}`)
if (name === 'unauthenicatedArticleLimitReached') {
if (value === 'true') {
document.cookie =
'unauthenicatedArticleLimitReached=false; path=/'
document.cookie = 'unauthenicatedArticleLimitReached=false; path=/'
console.log('Reset Article Limit')
}
} else if (name === 'articlesRead') {
Expand Down