A Chrome extension to fetch and view Salesforce object metadata directly from your browser.

Latest Version

Version
0.5
Update
September 12, 2023
Size
29.38KiB
Developer
Category
Users
51
Rating
0 ★
Manifest Version
3
Web Store Status
Languages Support
English
See more
Permissions
Cookies
See more

MetaForce Extension

This Chrome Extension background script is designed to interact with Salesforce APIs, focusing primarily on fetching metadata and data related to Salesforce objects. It listens for various actions triggered from the extension's content scripts and responds accordingly. Key functionalities include:

Authentication: It fetches Salesforce's session ID (SID) stored in cookies to authenticate API requests.
Data Retrieval: Uses the SID to fetch object metadata and actual data from Salesforce.
Multi-Domain Support: It can look for SID cookies across multiple Salesforce domains (salesforce.com and cloudforce.com).
Message Handling: Listens for messages such as 'CONTENT_SCRIPT_LOADED' and 'fetchMetadata' to perform specific tasks.
URL Monitoring: Monitors URL changes to refresh data when needed.
The script is well-organized, handling various edge cases and providing utility functions for sending success and error messages. It employs a mix of promises and callbacks for asynchronous operations. Overall, this script serves as a robust backbone for a Chrome Extension that aims to seamlessly interact with Salesforce.
Read more

Source Manifest.json

{"update_url": "https://clients2.google.com/service/update2/crx", "manifest_version": 3, "name": "MetaForce", "version": "0.5", "description": "A Chrome extension to fetch and view Salesforce object metadata directly from your browser.", "permissions": ["cookies"], "host_permissions": [ "https://*.salesforce.com/*", "https://*.visual.force.com/*", "https://*.lightning.force.com/*", "https://*.cloudforce.com/*", "https://*.visualforce.com/*" ], "background": { "service_worker": "background.js" }, "content_scripts": [ { "matches": [ "https://*.salesforce.com/*", "https://*.visual.force.com/*", "https://*.lightning.force.com/*", "https://*.cloudforce.com/*", "https://*.visualforce.com/*" ], "js": ["contentScript.js"], "run_at": "document_idle" } ], "action": { "default_popup": "popup/popup.html", "default_icon": { "16": "icons/icon.png", "48": "icons/icon.png", "128": "icons/icon.png" } }}
Read more