Eli Grey

jData – publicly share data

jData is a new (extremely tiny) library for sharing data about yourself everywhere without a website needing permission/URIs/ect. It is like having a globally accessible localStorage. It is accessible at jdata.eligrey.com in two different API flavors: postMessage and HTTP queries. It only works in browsers that support window.postMessage (ie. advanced browsers like Firefox 3 and the WebKit nightlies) and sorta works in IE 8 beta 2. I may add Google Gears support someday.

What is jData? – Think of the data stored on jData like cookies with no size limit; cookies that can be accessed by any website on the internet. It’s so lightweight that the postMessage API is exactly 300 bytes.
Why make this? – This would be a good resource for storing info about yourself that you are okay with any website on the internet knowing.

Hypothetical situation: Facebook started storing your name (with your permission) to jData.fullname. Then the people who run MySpace think this is a good idea and implement it too. Then other websites start checking jData and see if jData.fullname has been set already and pre-fill the corresponding input text box with your name on a sign up page.

(more…)

More rotⁿ fonts

I previously made two rot13 DejaVu fonts (rot13 DejaVu Sans and rot13 DejaVu Serif) so I thought I might as well make fonts for the other less-widely used rotn ciphers. All of these fonts are based on the open source DejaVu fonts. These are by no way official DejaVu fonts and are just remixes by me under the same license as the normal DejaVu fonts. If you want to distribute the fonts on your website, feel free to do so, and you could optionally link back to me if you want. I don’t care what you do with them. As with all the rotn ciphers, using them twice (ie. using the rot47 font to view rot47 encoded text) will result in the unciphered text. It’s a cipher that decodes what it encodes by doing the same rotations. The example pages require a modern browser that supports webfonts, such as Firefox 3.1 beta or Safari 3.1.2.

Associating files without file extensions in Windows

In Windows, you can associate file extensions with programs so they are opened by those programs by default. When you try to open a file without a file extension (most likely a text file made in a linux OS), you are prompted with the dialog to select a program to open the file but the checkbox to make the program you select always open files with the (non-existant) file extension of the current file is disabled. It is still possible to associate all files without file extensions with a program in Windows.

I have made batch files that allow you to set and remove program association on files without file extensions. I have also made two predone batch files for two programs Windows users are very likely to use to open files without file extensions. In the list of batch files after this, you may to check the files out and see that they are safe and will not damage your computer by clicking the “view source” link.
(more…)

Noteboard 2.0.4

Noteboard 2.0.4 introduces some bugfixes and it also remembers what you last resized your Noteboard window to if you use the bookmarklet (Noteboard). Firefox doesn’t let JavaScript resize windows by default (even if they were created using JavaScript so I made the launcher close the launching window and make a new popup sized correctly for Firefox. Safari, on the other hand, allows JavaScript to resize windows created with JavaScript so it just resizes the launcher popup. Then it changes the window id to ‘noteboard’ instead of ‘noteboard_launcher’ and loads Noteboard into the same popup.

Noteboard tweaks and Safari support

I am happy to say that Noteboard now supports Firefox 3+ AND Safari. It doesn’t support the current release of Safari so you have to use the Safari 3.1.2 nightlies as those builds include localStorage. Technically, I should be also be able to make Noteboard work with IE 8 beta 2 due to it also supporting localStorage, but I don’t want to waste my time making fixes for IE.

Now on to the tweaks for version 2.0.1:

  • Documents can now have custom titles instead of having the document name be the title.
  • The title quickly changes to “Noteboard” and changes back when you push Ctrl + D to bookmark Noteboard.
  • I stopped using uneval function built-into Firefox and took part of the JSON.stringify function from json.org’s JavaScript JSON script.
  • I added and changed these keyboard shortcuts:
    • Import is now Ctrl + Alt + 1
    • Export is now Ctrl + Alt + 2
    • To change the current document’s title, push Ctrl + Alt + T
  • Starting the open a document prompt (Ctrl + Alt + O), clicking OK, and leaving it blank opens up the shortcuts page.
  • The shortcuts page is no longer stored on your localStorage and is now a protected static document that can’t be edited/deleted.
  • A lot of code tidying up.

Noteboard 2.0

I have almost completely re-wrote Noteboard from the scratch and made Noteboard 2.0 because I felt that Noteboard 1.0.1 was not that extensible. There are a TON of changes in Noteboard 2.0, most notibly, multiple-document support. Just the same as the original Noteboard, it’s Firefox 3+ (and maby 2+) only. The reason there are only keyboard shortcuts (hotkeys) to control Noteboard is so there are no other elements other than a single text box. The stats bar has been disabled by default and can be toggled on by pushing Alt + Ctrl + I. All of the keyboard shortcuts are on the first document, ‘shortcuts’. I don’t reccomend deleting this document until you get used to using Noteboard.

With multiple document support, you can now create as many documents as you like. To create a document, push either Alt + Shift + N or Alt + Shift + C and type in the name of the document. To open a document you can push either Ctrl + Alt + O or Alt + Shift + O. To delete a document, you push Alt + Shift + D. To rename the current document you’re viewing, push Alt + Shift + R. All documents (and document names) have full Unicode support so you may name them whatever you want to and put whatever you want in them.

Another cool feature introduced in Noteboard 2.0 is document autoload URLs. (more…)

Noteboard 1.0.1 update

I have recently updated Noteboard. This update includes various improvements. You can visit Noteboard through noteboard.eligrey.com and noteboard.nfshost.com.

  • Instead of using Mozilla’s non-standard storage interface, I changed the code to use the standard WhatWG Storage Interface. Using this interface lets Firefox 3.1+ manage the data set by going to Options -> Advanced -> Network -> Offline Storage.
  • Ctrl+S now saves the text. I recommend you do Ctrl+Alt+S to not trigger the “Save As” dialog box. I accidentally used to push Ctrl+S all the time forgetting that it will autosave when I close the window and it couldn’t save in mid-edit. I can’t override the default Save As dialog box without having access privlaged scripts which are only for addons, ect.
  • Alt+Ctrl+D deletes all the data stored by Noteboard on the domain it is currently on. Think of it as clearing your cookies if Noteboard actually set cookies. This is mostly needed as an alternative to using Firefox 3’s buggy offline storage management that doesn’t work most of the time.
  • When you Ctrl+V paste, the text is autosaved.
  • Will work on any browser that supports localStorage or globalStorage and will temporary store the data for browsers that only support sessionStorage

Update: I never mentioned this but the last version of Noteboard had a tiny update that never got a blog post about it because of the update being so small. The update allowed it to be served in data URIs opened through links or in iframes due to most browsers allowing data URIs to inherit the domain of the referrer. This means you can serve Noteboard 1.0.1 in data URIs now.

bit.ly vulnerabilities

The bit.ly long url shortening service has an API that is used by their bit.ly bookmarklet to view past bit.ly url shortenings which can be used by any website.

I for one don’t feel like bit.ly users’ shortened link histories should be accessible over an unauthenticated API. Website owners can use JavaScript to find out all the sites users have shortened using bit.ly. The history API is identical to the bit.ly url stats API except it has history.php as its endpoint instead of feed.php.

I have quickly thrown together an example of what I can do with your bit.ly history. This example only works in Firefox, Safari, and Google Chrome because I only spent a few minutes making it and only tested it in Firefox while I made it.

Update: Fixed it to stop saying “Loading” if you have never used bit.ly. It now gives you a message to use bit.ly on a few long URLs and reload the page.

rot13 DejaVu fonts

I found myself wondering how to rot13 cipher text in a web browser without JavaScript or server-side interaction. I then came up with this idea, rot13 fonts. I have made rot13 equivalents for 2 DejaVu fonts, Sans and Serif. I only have the fonts use the rot13 affected characters, a-z; A-Z, Unicode ranges: U+0041-005a, U+0061-007a. This is so it would be more suitable for web use because the DejaVu fonts are 500KB+ each. The rot13 fonts are 12kb to 14kb large.

You can test these fonts to view “Uryyb Jbeyq!” (rot13 “Hello World!”) at this test page. The test page requires Firefox 3.1+ or Safari 3.1+ or for both rot13 DejaVu Sans and Serif to be installed on your computer.

The fonts are available for download here.

rot13 DejaVu Fonts being rendered in Safari 3.1.2

rot13 DejaVu Fonts being rendered in Safari 3.1.2

rot47 DejaVu fonts may be added when I get the time.