This PR represents the culmination of efforts to convert the "Say, Pi" userscript into a full-fledged Chrome extension. This transition not only enhances the stability and performance of "Say, Pi" but also paves the way for future enhancements and features.
Key Changes
Extension Manifest: Created a manifest.json file to define the Chrome extension, pointing to the existing saypi.user.js as the entry-point content script.
Code Compatibility: Modified the codebase to ensure compatibility between the userscript and the Chrome extension environments. This includes handling the GM_info object and removing the need for script injection for audio module functionalities.
Local Resource Loading: Updated the way WASM files are loaded for the VAD library. Now, these files are served locally within the extension, significantly improving loading times and adhering to Chrome's security policies.
Refactored AudioModule: Transformed AudioModule.js into an ES6 module, removing the need for DOM injection and streamlining the codebase.
Server Configuration: Updated server.js to handle HTTPS setup more flexibly, allowing the server to start without requiring certificate files in non-production environments.
Updated Build Process: Adjusted the Webpack configuration to align with the new structure and requirements of the Chrome extension.
This PR represents the culmination of efforts to convert the "Say, Pi" userscript into a full-fledged Chrome extension. This transition not only enhances the stability and performance of "Say, Pi" but also paves the way for future enhancements and features.
Key Changes
manifest.json
file to define the Chrome extension, pointing to the existingsaypi.user.js
as the entry-point content script.GM_info
object and removing the need for script injection for audio module functionalities.AudioModule.js
into an ES6 module, removing the need for DOM injection and streamlining the codebase.server.js
to handle HTTPS setup more flexibly, allowing the server to start without requiring certificate files in non-production environments.Demo Video
https://youtu.be/siJAj879ii4
Testing
Next Steps
Notes
README.md
and documentation for any necessary updates to reflect these changes.Commits