Skip to content

Commit

Permalink
feat(integration): Add support to execute packaged custom scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
with-shrey committed Mar 7, 2024
1 parent 0389fa9 commit 23fe927
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/content/customSampleScript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* @name SampleScript
* @urlAlias script_a_shortcode
* @urlRegex app.sample.com
*/
'use strict'

console.log('Custom script executed')
7 changes: 7 additions & 0 deletions src/custom-scripts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export const CustomScripts = {
'script_a_shortcode': {
name: 'Custom Script For XYZ',
file: 'customSampleScript.js',

},
}
9 changes: 8 additions & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import origins from './origins';
import origins, { CustomScripts as customScripts } from './origins';

declare const _default = origins as {
[key: string]: {
Expand All @@ -9,3 +9,10 @@ declare const _default = origins as {
};

export default _default;

export declare const CustomScripts = customScripts as {
[key: string]: {
name: string;
file?: string;
};
}
3 changes: 3 additions & 0 deletions src/origins.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export { CustomScripts } from './custom-scripts'

export default {
'airtable.com': {
url: '*://airtable.com/*',
Expand Down Expand Up @@ -707,3 +709,4 @@ export default {
name: 'Zube'
}
};

0 comments on commit 23fe927

Please sign in to comment.