Last active
October 4, 2024 09:55
-
-
Save PetreVane/090e9dd97d7ac2fd39cd3dfd4fb3a002 to your computer and use it in GitHub Desktop.
Set LocalStorage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
function setLicenseKey() { | |
localStorage.setItem('TM_useLicenseKey', 'your_license_key_here'); | |
console.log('TM_useLicenseKey has been set in local storage'); | |
const newChatButton = document.querySelector('[data-element-id="new-chat-button-in-side-bar"]'); | |
if (newChatButton && newChatButton.childNodes[1]) { | |
newChatButton.childNodes[1].textContent = 'License Key Set!'; | |
} | |
} | |
if (document.readyState === 'loading') { | |
document.addEventListener('DOMContentLoaded', setLicenseKey); | |
} else { | |
setLicenseKey(); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment