Dynamic URL Analysis in Lekhoniya : Personalized Content Experience
Introduction
Experience personalized content with the Dynamic URL Analysis script, an ingenious creation by the developer Subham Mandal. Integrated into the web application Lekhoniya, and associated with the brand name onessssweb, this script dynamically analyzes the URL to enhance user interactions and content display.
Overview
URL Digit Check
The checkURLDigits function dynamically analyzes the digits in the URL to determine the content display. If the URL contains more than seven digits, it assumes it's a specific content URL and fetches the corresponding content from Firebase. Otherwise, it loads content from the local storage.
function checkURLDigits() {
// ... (existing code)
if (digitsCount > 7) {
// Code to fetch content from Firebase based on URL
// ... (existing code)
} else {
// Code to load content from local storage
// ... (existing code)
}
}Firebase Content Fetch
The script fetches content from Firebase based on the extracted text from the URL.
fetch("https://onerealtimeserver-default-rtdb.firebaseio.com/lekhoniya/" + extractedText + ".json")
.then(response => response.json())
.then(data => {
// ... (existing code)
})
.catch(error => {
// Handle errors during the fetch request
console.log("Error:", error);
});Local Content Load
If the URL doesn't contain more than seven digits, the script loads content from local storage.
document.getElementById('ini').className = 'ini-out';
setTimeout(loadFromLocalStorage, 100);
document.getElementById('localaddress').value = 'lekhoniya';
// ... (existing code)Usage Instructions
- Dynamic Content Display: The script dynamically analyzes the URL and displays the corresponding content from Firebase or local storage.
Conclusion
Dynamic URL Analysis, designed by the innovative Subham Mandal, tailors the content experience in Lekhoniya based on the URL. Seamlessly integrated with the brand name onessssweb, this script enhances user interactions by dynamically adapting to the URL context.
Feel free to connect with Subham Mandal for any inquiries, suggestions, or enhancements related to this script. Enjoy a personalized content experience with the dynamic URL analysis feature of Lekhoniya!