/** * Function to remove "blocked" from the URL of any website. * * @param {string} url - The URL from which "blocked" should be removed. * @returns {string} The modified URL with "blocked" removed. */ function removeBlockedFromURL(url) { // Check if the URL contains "blocked" as a substring if (url.includes("blocked")) { // Replace "blocked" with an empty string to remove it from the URL const modifiedURL = url.replace("blocked", ""); return modifiedURL; } else { // If "blocked" is not found in the URL, return the original URL return url; } } // Usage Example for removeBlockedFromURL const websiteURL = "https://www.example.com/blocked-page"; const modifiedURL = removeBlockedFromURL(websiteURL); console.log(`Modified URL: ${modifiedURL}`);