eladnava / applicationize

Converts your favorite web apps into desktop apps with their own dedicated launcher icon.
https://applicationize.me/
Apache License 2.0
494 stars 86 forks source link

Auto set the footer year #121

Closed rdmdk closed 3 years ago

rdmdk commented 3 years ago

Instead of bumping it every year

eladnava commented 3 years ago

@rdmdk Awesome, cheers 🎉 💯 . It's live!

rdmdk commented 3 years ago

@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)

eladnava commented 3 years ago

@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?

rdmdk commented 3 years ago

@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.

eladnava commented 3 years ago

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).

eladnava commented 3 years ago

The workaround: https://github.com/eladnava/applicationize/issues/25#issuecomment-250857260

rdmdk commented 3 years ago

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 = '/'
}