Skip to content

Commit

Permalink
Begun AgregoreWeb#8 ,added script for orgmode but hook does not trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
telamon committed Jul 2, 2024
1 parent 7cefbc5 commit f8c3494
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,4 @@ bundle-json.js
bundle-markdown.js
bundle-ssb.js
bundle-reader.js
bundle-orgmode.js
8 changes: 6 additions & 2 deletions background.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* global chrome */
const FORBIDDEN_PROTOCOLS = ['devtools:']

// TODO: This hook is not triggered for org files, they're just simply downloaded.
chrome.webNavigation.onDOMContentLoaded.addListener(handleLoaded)

/**
Expand All @@ -15,14 +16,17 @@ const TYPE_MAP = {
// TODO: Hooks for activitystream rendering?
'application/activity+json': 'json',
'application/ld+json': 'json',
'application/ssb+json': 'ssb'
'application/ssb+json': 'ssb',
'text/x-org': 'orgmode',
'application/vnd.lotus-organizer': 'orgmode' // automatic chrome-headers
}

const SCRIPT_MAP = {
markdown: scriptURL('markdown'),
gemini: scriptURL('gemini'),
json: scriptURL('json'),
ssb: scriptURL('ssb')
ssb: scriptURL('ssb'),
orgmode: scriptURL('orgmode')
}

const code = `
Expand Down
3 changes: 2 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"bundle-markdown.js",
"bundle-json.js",
"bundle-ssb.js",
"bundle-reader.js"
"bundle-reader.js",
"bundle-orgmode.js"
]
}
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"build-gemini": "browserify ./gemini.js > bundle-gemini.js",
"build-ssb": "browserify ./ssb.js > bundle-ssb.js",
"build-reader": "browserify ./reader.js > bundle-reader.js",
"build": "npm run build-markdown && npm run build-json && npm run build-gemini && npm run build-ssb && npm run build-reader"
"build-org": "esbuild --bundle orgmode.js --outfile=bundle-orgmode.js",
"build": "npm run build-markdown && npm run build-json && npm run build-gemini && npm run build-ssb && npm run build-reader && npm run build-org"
},
"repository": {
"type": "git",
Expand All @@ -25,6 +26,7 @@
"homepage": "https://github.com/RangerMauve/extension-agregore-renderer#readme",
"devDependencies": {
"browserify": "^17.0.0",
"esbuild": "^0.23.0",
"standard": "^17.0.0"
},
"dependencies": {
Expand All @@ -36,7 +38,8 @@
"ssb-fetch": "^1.5.2",
"ssb-markdown": "^6.0.7",
"ssb-ref": "^2.16.0",
"ssb-uri2": "^1.8.1"
"ssb-uri2": "^1.8.1",
"uniorg": "^1.2.0"
},
"standard": {
"ignore": [
Expand Down

0 comments on commit f8c3494

Please sign in to comment.