Closed rdmdk closed 3 years ago
@rdmdk Awesome, cheers 🎉 💯 . It's live!
@eladnava fantastic! have some ideas for other improvements but unsure how to implement (e.g. adding data-attributes to the html to indicate the webpage is being loaded inside an extension - not sure if that's even doable)
@rdmdk What would be the intended behavior in that case? Are you trying to make it possible for websites to detect they are being Applicationized and behave/display differently?
@eladnava I've applicationized a few of my own webapps and in some rare instances, they behaved differently. For example, on window.prompt(a, b), b does not display. If the html tag were to be coded as html data-crx or html data-extension, I could work around this or just omit that functionality entirely whenever the app loads inside of an extension.
Unfortunately, that has to do with issue https://github.com/eladnava/applicationize/issues/36. There is no easy/clean way to resolve it unfortunately (but a workaround is mentioned in that issue).
Workaround: especially if you're Applicationizing your own web apps:
URL: https://exampleurl.com?crx
JS:
if (localStorage.crx) document.body.setAttribute('data-crx', '');
else if (window.location.href.includes('crx')) {
localStorage.crx = true;
window_location.href = '/'
}
Instead of bumping it every year