') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); chore: pin actions with commit sha by AndyScherzinger · Pull Request #111 · LizardByte/actions · GitHub
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
6 changes: 3 additions & 3 deletions .github/workflows/ci-tests.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,15 +35,15 @@ jobs:
- windows-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}

- name: Set up Node
uses: actions/setup-node@v6
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: latest

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -27,7 +27,7 @@ jobs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- name: Build matrix with action paths
id: set-matrix
Expand All@@ -53,7 +53,7 @@ jobs:
include: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- name: Setup bash (Alpine)
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- name: Setup Release
id: setup-release
Expand Down
2 changes: 1 addition & 1 deletion actions/audit_repos/action.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -122,7 +122,7 @@ runs:
INPUT_CHECK_CONTRIBUTING: ${{ inputs.checkContributing }}
INPUT_CHECK_SECURITY: ${{ inputs.checkSecurity }}
INPUT_CHECK_SPONSORS: ${{ inputs.checkSponsors }}
uses: actions/github-script@v8
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
github-token: ${{ inputs.token }}
script: |
Expand Down
2 changes: 1 addition & 1 deletion actions/release_changelog/action.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -27,7 +27,7 @@ runs:
env:
changelog_branch: ${{ inputs.changelogBranch }}
changelog_file: ${{ inputs.changelogFile }}
uses: actions/github-script@v8
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
github-token: ${{ inputs.token }}
script: |
Expand Down
6 changes: 3 additions & 3 deletions actions/release_create/action.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -71,7 +71,7 @@ runs:
- name: VirusTotal
if: inputs.virustotal_api_key != ''
id: vt
uses: cssnr/virustotal-action@v1.7.0
uses: cssnr/virustotal-action@e2d194486614b28c3cf884f4bf13e39cac959b8d # v1.7.0
with:
file_globs: ${{ inputs.artifacts }}
sha256: true
Expand DownExpand Up@@ -135,7 +135,7 @@ runs:
} >> $GITHUB_OUTPUT

- name: Create/Update GitHub Release
uses: ncipollo/release-action@v1.20.0
uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
with:
allowUpdates: ${{ inputs.allowUpdates }}
artifactErrorsFailBuild: ${{ inputs.artifactErrorsFailBuild }}
Expand DownExpand Up@@ -163,7 +163,7 @@ runs:
SLEEP_DURATION: ${{ inputs.sleepDuration }}
CURRENT_TAG: ${{ inputs.tag }}
if: inputs.deleteOtherPreReleases == 'true'
uses: actions/github-script@v8
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
github-token: ${{ inputs.token }}
script: |
Expand Down
6 changes: 3 additions & 3 deletions actions/release_homebrew/action.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -102,7 +102,7 @@ runs:

- name: Setup Python
id: setup-python
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.11"
update-environment: false
Expand DownExpand Up@@ -138,7 +138,7 @@ runs:
echo "::endgroup::"

- name: Checkout (org homebrew repo)
uses: actions/checkout@v6
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: ${{ inputs.org_homebrew_repo }}
ref: ${{ inputs.org_homebrew_repo_base_branch }}
Expand All@@ -148,7 +148,7 @@ runs:

- name: Checkout (homebrew-core)
if: ${{ inputs.contribute_to_homebrew_core == 'true' }}
uses: actions/checkout@v6
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: ${{ inputs.homebrew_core_fork_repo }}
ref: ${{ inputs.homebrew_core_base_branch }}
Expand Down
2 changes: 1 addition & 1 deletion actions/screenshot/action.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -68,7 +68,7 @@ runs:

- name: Upload artifacts
if: github.repository == 'LizardByte/actions'
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: screenshot-${{ runner.os }}
path: screenshot.png
Expand Down
4 changes: 2 additions & 2 deletions actions/setup_virtual_desktop/action.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -61,7 +61,7 @@ runs:
# For PR testing only
- name: Checkout
if: github.repository == 'LizardByte/actions'
uses: actions/checkout@v6
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- name: Tests
if: github.repository == 'LizardByte/actions'
Expand DownExpand Up@@ -187,7 +187,7 @@ runs:

- name: Upload screenshots
if: github.repository == 'LizardByte/actions'
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: ${{ steps.artifact-name.outputs.name }}
path: tests/screenshots/*.png
Expand Down
Loading