Awfice – A collection of tiny office suite apps
zserge.com
zserge.com
I've published minimal setup to github for convenience [2].
UI is not included (yet) as I use bookmarklets, it is easy and fun way to extend the platform. Each published bookmarklet contains builder (check page source [3]) — change contenteditable, click Update and drag to bookmarks bar.
It is similar to Smalltalk — edit image with image tools. In fact it is not hard to write `do it (d)`, `print it (p)`.
[1] http://sergeykish.com/live-pages
And demo now has Save, Load, Reset buttons to store changes in localStorage. There is also body.onload handler so it loads changes on page load [2].
Do you think running own server is a big obstacle?
$ git clone https://github.com/sergeykish/live-pages.git
$ sudo pacman -S ruby
$ cd live-pages
$ bundle install
$ bundle exec rackup
I may write browser extension if it helpsPaste this into the URL bar:
data:text/html,<h1>hello</h1>
or try this like the article suggests: data:text/html,<html contenteditable> data:text/html,<script>alert('pasting code from the internet in to your address bar should not be encouraged');</script> javascript:alert(document.cookie)1. It strips the JavaScript: part away if I just paste it once
2. Even if I re-add it manually, it still does no alert
Ergo, a sane browser can be quite sandboxed to avoid the average user to do stupid to easily.
So that's one difference. Not that the type of person to use NoScript would likely paste obvious javascript into the address bar...
Edit: Doesn't look like you can create a valid URL with that format, but it can be launched via pasting in (obviously), a bookmark (which the contents of which could be obfuscated by telling a user to drag an image to the bookmark bar and click it), and can be launched via command line, e.g.
start firefox "data:text/html,<script>alert('');</script>"bookmark to access archive.today instead of addon
And https://viewdns.info/ping/?domain=archive.today to get the fastest IP and include it in /etc/hosts
data:text/html,<div id="c" contenteditable></div><a id="p"></a><script>var el=document.getElementById('c');el.addEventListener('input',function(){document.getElementById('p').textContent='Copy me';document.getElementById('p').href="data:text/html,"+this.parentElement.innerHTML;},false);</script>
And to expand that awful payload, it's basically the very simple: <div id="c" contenteditable></div>
<a id="p"></a>
<script>
var el = document.getElementById('c');
el.addEventListener('input', function() {
document.getElementById('p').textContent = 'Copy me';
document.getElementById('p').href = "data:text/html," + this.parentElement.innerHTML;
}, false);
</script>
The idea being, you can _almost_ have a self-saving editable page. Because it was fun to make.> Well, in no way it’s a replacement for a proper office suite. But it’s a good demonstration of minimalism and tiny code.
Exactly that. It is a nice example and I learned something today. Loved the writeup and the creativity behind it.
0: HTML(/SVG/plaintext) sandbox in dataURI under 1kB: https://gist.github.com/myfonj/c8ce74bf549e19600026ce9022388... (persistence in location.hash, sadly blocked in Chrome recently)
1: similar, quite famous "MiniCodeEditor", even smaller, served from file (2013): http://xem.github.io/miniCodeEditor/ (https://news.ycombinator.com/item?id=6860642)
2: famous "Spreadsheet in 30 LOC" (2013): https://jsfiddle.net/ondras/hYfN3/ (https://news.ycombinator.com/item?id=6725387)
With these few kilobytes of code plus the hundreds of megabytes of runtime that constitutes the browser still take up less storage space than an office suite that can retain State and persist data?
In some sense saying a browser based tool is small is like putting "c:\path\to\word.exe" in a bat-file and counting the lines.
I'd love to see more use of contenteditable in general, and continuing incremental improvement to browser support & standards for it. Right now it's fairly niche, but there's huge potential here imo to build a web that's easier for users to edit and create for themselves directly.
Significantly more complex though as you need a bunch of JS, and it's Chromium-only right now.
There is Web Server as Chrome extension [1], MIT license.
PWA should be able to intercept PUT request and stub GET request with empty page.
[1] https://chrome.google.com/webstore/detail/web-server-for-chr...
No. On most normal browser this triggers the bookmarks-bar and in case of Firefox, the Page Info dialog.
Microsoft Office is a digital approximation of a paper-based paradigm, but it's not really great at either one of those things. The Web and its plaintext formats are way better for sharing and interoperability than MS Office formats. Some fans of MS Office will dispute this, but they're not being honest with themselves. The fans who aren't lying to themselves will instead point out that it's better for print, but it's only better for print in comparison to the Web. If you're actually serious about print, then TeX and PDF/PostScript are better. But most stuff created in Microsoft office isn't ever really intended for print, anyway. So what gives? Microsoft Office succeeds despite being mediocre on both measures because while the alternatives each have things that make them better in their strong suit, they fail at the things they aren't strong at. Microsoft Office squeaks by because it's able to get a C in all its classes, whereas the others remain well-liked among their friends and family, but they don't get to graduate.
Yes I can drag and drop the code to new tabs but it would have been so easy to have demo links, or to run the code in iframes on the page itself!
But I'm always surprised people don't realise how much difference it makes to have a big "DEMO" link in people's face vs "oh you can click here and here and then you see it!"
Adding these links may literally be the 5 minutes in your creative process that will give you the most value
Of course, if you're trying to monetize, or make sure it's easy for less savvy folks to access a useful tool, you're probably absolutely right.
You've made me think though. If it is hard to copy URL, maybe it is hard to copy code into the console. I've added buttons to my contenteditable demo [2].
[1] https://blog.mozilla.org/security/2017/11/27/blocking-top-le...
Didn't know this.
You can also access input elements using `form.elements.$inputName`.
<form name="contact">
<input name="message"/>
</form>
this form can be accessed directly using const form = document.forms.contact
const message = form.elements.messageText editor - 63 bytes, Spreadsheet - 758 bytes, Drawing app - 410 bytes, Presentation maker - 631 bytes
Cool ideas!
data:text/html,<textarea>
with some CSS to make it fit the page size.Update:
data:text/html,<textarea style='font-size:1.25rem;margin:0px;height:100%25;width:100%25;'>runtime: >100 MB
import fullofficesuit
def main:
fullofficesuit.presentation() import linuxkernel
if __name__ == "__main__":
linuxkernel.run()
Not saying you're wrong, just that the size and complexity of your runtime is an interesting consideration :)I can write a better tiny office suite in Visual Basic for applications.
it inspires!: a reflection of this for pico8-likes, how would it look? how would it be built?
Check my simple presentation tool https://mark.show