diff --git a/src/content/customSampleScript.js b/src/content/customSampleScript.js new file mode 100644 index 000000000..f94d7ad56 --- /dev/null +++ b/src/content/customSampleScript.js @@ -0,0 +1,8 @@ +/** + * @name SampleScript + * @urlAlias script_a_shortcode + * @urlRegex app.sample.com + */ +'use strict' + +console.log('Custom script executed') \ No newline at end of file diff --git a/src/custom-scripts.js b/src/custom-scripts.js new file mode 100644 index 000000000..72fcf2467 --- /dev/null +++ b/src/custom-scripts.js @@ -0,0 +1,7 @@ +export const CustomScripts = { + 'script_a_shortcode': { + name: 'Custom Script For XYZ', + file: 'customSampleScript.js', + + }, +} \ No newline at end of file diff --git a/src/index.d.ts b/src/index.d.ts index ad3dd54ee..1f77534d4 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -1,4 +1,4 @@ -import origins from './origins'; +import origins, { CustomScripts as customScripts } from './origins'; declare const _default = origins as { [key: string]: { @@ -9,3 +9,10 @@ declare const _default = origins as { }; export default _default; + +export declare const CustomScripts = customScripts as { + [key: string]: { + name: string; + file?: string; + }; +} diff --git a/src/origins.js b/src/origins.js index 175c7fa96..24d001830 100644 --- a/src/origins.js +++ b/src/origins.js @@ -1,3 +1,5 @@ +export { CustomScripts } from './custom-scripts' + export default { 'airtable.com': { url: '*://airtable.com/*', @@ -707,3 +709,4 @@ export default { name: 'Zube' } }; +