Closed avikalpg closed 11 months ago
The changes primarily focus on improving error handling, code readability, and maintainability. The code now uses promises for asynchronous operations, and the chrome.storage.local.get
method to retrieve data from local storage. The orchestrator
function has been refactored to receive input parameters directly, and the setStorage
and getStorage
functions have been removed. The changes also include a more detailed description of the orchestrator
function's purpose and functionality.
File | Summary |
---|---|
backgroundScript.js |
The code now uses promises for asynchronous operations and includes additional .then calls to handle the response from the backend API. |
scripts/api.js |
The function apiCallOnprem has been refactored to include a try-catch block for error handling and uses chrome.storage.local.get to retrieve the token. |
scripts/init.js |
The script now initializes once the window is loaded, retrieves data from local storage, and sets up a MutationObserver to monitor changes in the document's body. |
scripts/orchestrator.js |
The orchestrator function has been refactored to receive input parameters directly and includes a detailed description of its functionality. |
scripts/utilities.js |
The destroyElement function has been simplified, and the setStorage and getStorage functions have been removed. |
Relevant users for this PR: | Contributor Name/Alias | Code Coverage |
---|---|---|
tapishr | 99.25% | |
ajayVibinex | 0.75% |
Auto-assigning to following reviewers: tapishr ajayVibinex
Code coverage is calculated based on the git blame information of the PR. To know more, hit us up at contact@vibinex.com. To change comment and auto-assign settings, go to your Vibinex settings page.
SonarCloud Quality Gate failed.
1 Bug
0 Vulnerabilities
0 Security Hotspots
3 Code Smells
No Coverage information
0.0% Duplication
Catch issues before they fail your Quality Gate with our IDE extension SonarLint
Relevant users for this PR: | Contributor Name/Alias | Code Coverage |
---|---|---|
tapishr | 99.25% | |
ajayVibinex | 0.75% |
Auto-assigning to following reviewers: tapishr ajayVibinex
Code coverage is calculated based on the git blame information of the PR. To know more, hit us up at contact@vibinex.com. To change comment and auto-assign settings, go to your Vibinex settings page.
Reverts Alokit-Innovations/chrome-extension#78
Summary by CodeRabbit
backgroundScript.js
andapi.js
for better performance and reliability.init.js
to initialize the script after the window is loaded, improving the user experience by ensuring the script runs at the right time.orchestrator.js
function, making it easier for developers to understand its purpose and functionality.destroyElement
function inutilities.js
for better readability and maintenance.setStorage
andgetStorage
functions fromutilities.js
, streamlining the codebase.These changes aim to enhance the software's performance, reliability, and maintainability, providing a smoother user experience.