') + ')', '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); } })(); })(); bump electron to 6.1.4 by antoinerg · Pull Request #266 · plotly/orca · GitHub
Skip to content
This repository was archived by the owner on Aug 27, 2026. It is now read-only.
/orcaPublic archive
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
24 changes: 23 additions & 1 deletion .circleci/config.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,6 +32,9 @@ workflows:
- test-image:
requires:
- docker-build-and-push
- test-dash-preview:
requires:
- docker-build-and-push

version: 2
jobs:
Expand DownExpand Up@@ -83,6 +86,7 @@ jobs:
command: npm run coverage
- store_artifacts:
path: build
destination: /

test-node-v6:
<<: *base
Expand All@@ -103,7 +107,24 @@ jobs:
name: Run image test
command: ./.circleci/test-image.sh
- store_artifacts:
path: build/
path: build
destination: /

test-dash-preview:
docker:
- image: quay.io/plotly/image-exporter:$CIRCLE_SHA1
- image: quay.io/plotly/image-exporter:$CIRCLE_SHA1
environment:
LIBGL_ALWAYS_SOFTWARE: true
GALLIUM_DRIVER: softpipe
steps:
- checkout
- run:
name: Run dash-preview test
command: ./.circleci/test-dash-preview.sh
- store_artifacts:
path: build
destination: /

docker-build-and-push:
docker:
Expand DownExpand Up@@ -233,3 +254,4 @@ jobs:
zip -r artifacts/conda-linux-64.zip ./linux-64
- store_artifacts:
path: artifacts
destination: /
10 changes: 10 additions & 0 deletions .circleci/test-dash-preview.sh
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# override CircleCi's default run settings,
# so that we run all tests and do not exit early
# on test failures.
set +e
set +o pipefail

./test/dash-preview/render_mocks_cli build/test_dash_previews
#./test/image/compare_images test/image/baselines build/test_images build/test_images_diff
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -94,7 +94,7 @@ docker build -t "$DOCKER_ORCA_IMAGE" -f deployment/Dockerfile .
To run the image tests, run the following:
```
./test/image/render_mocks_cli build/test_images "$DOCKER_ORCA_IMAGE" && \
./test/image/compare_images test/image/baselines build/test_images build/
./test/image/compare_images test/image/baselines build/test_images build/test_images_diff
```

#### Generate new baselines
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,7 +31,7 @@ If you have Node.js installed (recommended v8.x), you can easily install Orca
using npm as:

```
$ npm install -g electron@1.8.4 orca
$ npm install -g electron@6.1.4 orca
```

which makes the `orca` executable available in your path.
Expand Down
4 changes: 4 additions & 0 deletions bin/orca.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,4 +8,8 @@ const args = process.argv.slice(2)
const pathToMain = path.join(__dirname, 'orca_electron.js')
args.unshift(path.resolve(pathToMain))

// Sandbox is enabled by default since electron v5
// Fix sandbox issue (https://github.com/electron/electron/issues/17972)
args.push('--no-sandbox')

spawn(electronPath, args, { stdio: 'inherit' })
Loading