Skip to content

Releases: Ivans-Labs/Custom-Text-Replacer-Extension

Latest - V1.4

18 Nov 01:07
Compare
Choose a tag to compare

popup.js:

  1. Using textContent to set text content, which avoids the risk of injecting HTML or script content inadvertently.
  2. Encapsulating functionality into smaller, reusable functions, which makes the code easier to read and maintain.
  3. Adding constants for IDs, class names, and messages to avoid typos and make changes easier.
  4. Adding error handling for Chrome API interactions, displaying messages to the user when something goes wrong.

popup.html:

  1. Improve Styling

popup.css:

  1. Improve styling

Full Changelog: v1.3...v1.4

Latest

10 Nov 13:25
Compare
Choose a tag to compare

popup.js:

  • Event Listeners: Added event listeners for DOMContentLoaded and click events to handle user interactions with the popup.
  • Display Replacements: Implemented displaySavedReplacements() to dynamically display the list of saved text replacements.
  • Add/Remove Replacements: Added functions addReplacementPair() and removeReplacementPair() to handle the addition and removal of replacement pairs.
  • Error Handling: Created showError() to display error messages in a user-friendly manner.
  • Tab Switching: Implemented switchTab() to switch between the Home and Settings tabs within the popup.
  • Settings Management: Added loadSettings() and saveSettings() to handle the retrieval and storage of user preferences.
  • Status Messages: Included showStatus() to provide feedback when settings are saved.
  • Security Enhancements: Included an escapeHtml() function to sanitize user input and prevent XSS attacks.
  • User Feedback: Ensured that error and status messages are displayed to the user, with automatic hiding after a set interval.

contentScript.js:

  • Text Replacement: Created a replaceTextOnPage() function to replace text on the webpage according to the saved replacements and settings.
  • Regular Expression Escaping: Included an escapeRegExp() function to escape special characters in regular expressions.
  • Recursive Text Node Replacement: Implemented a recursive approach to find and replace text within text nodes of the DOM.
  • Storage Handling: Used chrome.storage.sync.get() to retrieve settings and replacement pairs and apply them to the page content.
  • Settings Application: Added logic to check for enabled settings such as case sensitivity and whole word matching before performing text replacements.

Full Changelog: v1.2...v1.3

Latest - V1.2

10 Nov 02:21
Compare
Choose a tag to compare

Full Changelog: v1.1...v1.2

First Release!

10 Nov 01:40
Compare
Choose a tag to compare
v1.1

update: readme