Log In  

Fixes:

Features:

  • pixel-perfect auto-resizing (optional, set autoresize to true in html)
  • minor enhancements (pico8 palette colors, black frame with shadow)
  • play button when autoplay is denied (in compliance with autoplay policy changes in chrome 66)

Tested on:

  • win10 (chrome,opera,firefox, edge(blurry as expected, lol@ms))
  • linux mint (chromium,firefox)
  • macos (safari)
  • itch.io, site & app (min embed size is 516x540, close fit with borders without autoresize)

How to:
unzip ub.html to {application data}/pico-8/plates
and then
> EXPORT FOO.HTML -P UB

minified version:
> EXPORT FOO.HTML -P UBM

Download:
https://www.lexaloffle.com/bbs/files/13845/ub_html_12.zip

Have fun!

(edit) no mobile support for now

...
1.2: power button when autoplay disabled (chrome update may 2018)
1.1c: fixed cursor keys scrolling page within iframe
1.1b: removed CRs, added minified
1.1: fixed select/drag/context menu
1.0: first version

Previous versions:
https://www.lexaloffle.com/bbs/files/13845/ub_html_11c.zip
https://www.lexaloffle.com/bbs/files/13845/ub_html_11b.zip
https://www.lexaloffle.com/bbs/files/13845/ub_html_10.zip

(free to use and modify, no attribution required)

P#50793 2018-03-25 09:21 ( Edited 2018-05-06 22:39)

Ah, thank you so much, this is perfect :)

P#50800 2018-03-25 12:53 ( Edited 2018-03-25 16:53)

On windows noticed that PICO-8 generates corrupted newlines from your template:
"\r\r\n" ( 0D 0D 0A ) instead of "\r\n" ( 0D 0A )

This appears to not affect browsers much but it sure affects text editors like Notepad++, plus it makes the HTML pointlessly bigger :p

A solution is to convert your template to unix newlines format ( 0D 0A -> 0A ) to get around the PICO-8 bug... besides that's the proper format you should use anyway. ;)

P#51126 2018-03-31 23:06 ( Edited 2018-04-01 03:06)
1

Windows systems really need to stop doing the \r entirely.

Just, stop.

There's no need to emulate a physical printer.

P#51132 2018-04-01 01:53 ( Edited 2018-04-01 05:53)

updated!
yeah it seems pico-8 unconditionally adds CRs on windows...

P#51138 2018-04-01 05:13 ( Edited 2018-04-01 09:13)

Nice theplate!
It's fixing the bug with the stat(4) function on browser?

P#51864 2018-04-22 05:40 ( Edited 2018-04-22 09:40)

@MrBigaston: I don't think so, since I wasn't aware of that issue. I see it's about getting the clipboard content but I couldn't find more info... maybe it isn't implemented yet?

P#51871 2018-04-22 11:48 ( Edited 2018-04-22 15:48)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 18:19:27 | 0.014s | Q:20