-
Notifications
You must be signed in to change notification settings - Fork 5.4k
feat: cp-13.12.0 only use build feature flag for sidepanel #38408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 18 commits
8faf9bb
a41e775
29dcfa1
41ee047
bcf1659
97231f5
f00030e
5f662b7
733a22b
e3f10e8
faf9891
d390cd2
8c865ce
cd6e517
956cadb
3e29061
a4980cb
c286e1e
fa9d999
920ea47
e692d9a
056ccbf
f78abd4
67c4541
b14a9d5
11255c1
2fa16aa
bb8b7e3
6f558d9
4916d85
346dad3
23c0f5d
4b50616
cab7484
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -801,6 +801,39 @@ async function initBundler( | |
|
|
||
| const sentryRegEx = /^https:\/\/sentry\.io\/api\/\d+\/envelope/gu; | ||
|
|
||
| /** | ||
| * Check if sidepanel is enabled by examining the manifest at runtime. | ||
| * Only works on Chrome-based browsers (Firefox doesn't support sidepanel). | ||
| * | ||
| * @param {Driver} driver - The WebDriver instance | ||
| * @returns {Promise<boolean>} True if sidepanel permission is present in manifest | ||
| */ | ||
| async function isSidePanelEnabled(driver) { | ||
| try { | ||
| const manifest = await driver.executeScript(` | ||
| try { | ||
| if (typeof chrome !== 'undefined' && chrome.runtime && chrome.runtime.getManifest) { | ||
| return chrome.runtime.getManifest(); | ||
| } | ||
| return null; | ||
| } catch (e) { | ||
| return null; | ||
| } | ||
| `); | ||
|
|
||
| const hasSidepanel = Boolean(manifest?.permissions?.includes('sidePanel')); | ||
|
|
||
| // Log for debugging | ||
| console.log(`Sidepanel check: ${hasSidepanel ? 'enabled' : 'disabled'}`); | ||
|
||
|
|
||
| return hasSidepanel; | ||
| } catch (error) { | ||
| // Chrome API not accessible (e.g., LavaMoat scuttling mode, Firefox) | ||
| console.log('Sidepanel check failed:', error.message); | ||
| return false; | ||
| } | ||
| } | ||
ameliejyc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| module.exports = { | ||
| DAPP_HOST_ADDRESS, | ||
| DAPP_URL, | ||
|
|
@@ -833,4 +866,5 @@ module.exports = { | |
| clickNestedButton, | ||
| sentryRegEx, | ||
| createWebSocketConnection, | ||
| isSidePanelEnabled, | ||
| }; | ||
Uh oh!
There was an error while loading. Please reload this page.