Skip to content

Commit

Permalink
chrome build 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
evandor committed Dec 31, 2024
1 parent 18a888f commit 877fcd5
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
name: "Upload and release"
with:
product-id: "d5d382d8-4033-4559-a15a-c12e8a9f64e0"
zip-path: dist/bex/Packaged.tabsets.net.zip
zip-path: dist/bex-edge/Packaged.tabsets.net.zip
api-key: ${{ secrets.EDGE_API_KEY }}
client-id: ${{ secrets.EDGE_CLIENT_ID }}
upload-only: true
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Upload & release
uses: mnao305/[email protected]
with:
file-path: dist/bex/Packaged.tabsets.net.zip
file-path: dist/bex-chrome/Packaged.tabsets.net.zip
extension-id: afkknkdbgondbbfjehipnjmojndnjhjg
client-id: ${{ secrets.CLIENT_ID }}
client-secret: ${{ secrets.CLIENT_SECRET }}
Expand Down
8 changes: 8 additions & 0 deletions src-bex/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
"js": [
"tabsets-content-script.ts"
]
},
{
"matches": [
"*://*/www/index.html#/mainpanel/MHTML---disabled---*"
],
"js": [
"my-content-script.ts"
]
}
],
"content_security_policy": {
Expand Down
32 changes: 28 additions & 4 deletions src-bex/my-content-script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { createBridge } from '#q-app/bex/content'

// The use of the bridge is optional.
const bridge = createBridge({ debug: false })
const bridge = createBridge({ debug: true })
/**
* bridge.portName is 'content@<path>-<number>'
* where <path> is the relative path of this content script
Expand Down Expand Up @@ -38,7 +38,8 @@ const defaultFrameHeight = '62px'
* Set the height of our iFrame housing our BEX
* @param height
*/
function setIFrameHeight(height: any) {
function setIFrameHeight(height: string) {
bridge.log('logging2', height)
iFrame.height = height
}

Expand All @@ -49,11 +50,34 @@ function resetIFrameHeight() {
setIFrameHeight(defaultFrameHeight)
}

/**
* The code below will get everything going. Initialize the iFrame with defaults and add it to the page.
* @type {string}
*/
iFrame.id = 'bex-app-iframe'
iFrame.width = '100%'
resetIFrameHeight()

// Assign some styling so it looks seamless
Object.assign(iFrame.style, {
//position: 'fixed',
top: '0',
right: '0',
bottom: '0',
left: '0',
border: '0',
zIndex: '9999999', // Make sure it's on top
// overflow: 'visible'
})
;(function () {
// When the page loads, insert our browser extension app.
iFrame.src = chrome.runtime.getURL('www/index.html')
document.body.prepend(iFrame)
})()

declare module '@quasar/app-vite' {
interface BexEventMap {
// /* eslint-disable @typescript-eslint/no-explicit-any */
'some.event': [{ someProp: string }, void]
// /* eslint-enable @typescript-eslint/no-explicit-any */
}
}

Expand Down

0 comments on commit 877fcd5

Please sign in to comment.