Skip to main content
xenoveritas.org

Main navigation

  • Categories
  • Home
  • Links
  • Name Generator
  • Scramble
User account menu
  • Log in

Breadcrumb

  1. Home

Web

Technologies related to the web.

By Xenoveritas, 30 June, 2015

JavaScript Closures and Loops

Topics
Web
JavaScript

JavaScript closures can be kind of weird. The way a closure works within a loop is a fairly common "gotcha" because it doesn't work in the way that it intuitively feels like it should.

Take the following block of code:

for (var i = 0; i < 5; i++) {
    var button = document.createElement("button");
    button.innerHTML = "Button #" + (i + 1);
    button.onclick = function() {
        alert("You clicked on " + button.innerHTML + "!");
    };
    document.body.appendChild(button);
    document.body.appendChild(document.createElement('br'));
}

What does that do? Read More to find out.

By Xenoveritas, 5 April, 2013

Roger Ebert has died

Topics
Web

Roger Ebert has lost his battle with cancer and died today at age 70 - and I'm actually really saddened by this. I've followed his Twitter feed for ages - in fact, assuming Twitter lists people in reverse order that they were followed, he's the fourth person I followed on Twitter. (Minus any I've unfollowed, of course.) For a while he was pretty much the only reason I ever even bothered to check Twitter.

By Xenoveritas, 15 March, 2013

Colossal Cave Adventure web port version 0.10

Topics
Web
Video Games

I've updated my Colossal Cave Adventure JavaScript port. It fixes a few bugs related to the Plover room, but probably more importantly, adds the ability to save the game. Save games are done by creating a new link that can be bookmarked. The URL can be loaded in order to restore the game to whatever state it was at when the game was saved.

By Xenoveritas, 26 August, 2012

Oh, right, the CherryPy remote control thing

Topics
Web
Technology

Oh, right, I did say I was going to try and create a CherryPy-based webapp front end. So here is a very quick and dirty implementation that provides some very basic control over the TV. Specifically, basic volume control (up and down), and the various input controls. Which is what I wanted out of it.

By Xenoveritas, 4 October, 2011

Heh

Topics
Web
Technology
Apple

I know I'm not the only one this is happening to, but it's still amusing:

Apple's website returning a HTTP 403 Forbidden error

Update: Just to be clear, this happened immediately after the iPhone 4S was announced (October 4th, 2011), but before Steve Jobs's death (October 5th, 2011). Note the time stamp.

By Xenoveritas, 9 July, 2011

Restaurant Website Nightmares

Topics
Web

After watching an episode of Kitchen Nightmares (sadly the US version, the UK version is better), I decided it might be time to try and get some takeout from one of the many local restaurants in my area.

Unfortunately, I am a bit of an "introvert," and therefore don't know anyone in my area and know next to no restaurants. So to Google Maps it is to look at local pizza places.

That finds me today's entry for "Restaurant Website Nightmares," Jimmy's Pizzeria.

By Xenoveritas, 18 June, 2011

Facebook.net NoScript Surrogate Script

Topics
Web
Firefox

This is only for blip.tv, but as of now, if you have NoScript set to block Facebook.net, you won't be able to view videos on blip.tv.

Thankfully, there is a feature in NoScript called "surrogate scripts" that allows NoScript to substitute a script stub to make things work on websites even if a given domain is blocked. So all I need to do it write a surrogate script to implement the functions it needs.

It turns out blip.tv doesn't work because a single function is missing: FB.Event.subscribe. So the entire surrogate script is:

By Xenoveritas, 24 November, 2010

Some Useful AviSynth Scripts

Topics
Web
Movies

Since I've written a whole bunch of AviSynth scripts for my Armored Core LP, I might as well post them for anyone who might find them useful.

This includes functions for fast forwarding 2×, 4×, 8×, and 16×, along with a picture-in-picture function.

AviSynth Utility Scripts

By Xenoveritas, 21 November, 2010

Colossal Cave Adventure

Topics
Video Games
Web

Well, since I've actually got the thing working for the most part, try playing the Colossal Cave Adventure, ported to JavaScript! This (should) be the entire mostly-original game, playable right from in your browser.

By Xenoveritas, 27 August, 2010

Screw Theora

Topics
Web

Seriously, screw Theora. None of the tools work. Really, there's no reason to go beyond that at all. ffmpeg can't create working Ogg Theora files for no discernible reason. The makers of Theora don't provide an encoder, so it's not like you can just use theirs! The only working Theora tool appears to be ffmpeg2theora - which is completely useless because it can't be used to remux streams.

The one thing Xiph does provide, a tool for creating Ogg streams, doesn't create working streams. Making it completely useless as well.

Pagination

  • 1
  • Next page
Web

Current Games

I'm currently playing:

  • Final Fantasy XIV: Endwalker

I intend to maybe get around to finishing:

  • Literally anything else

Video Games Section

Thought for the Moment

I never have thoughts any more.

Old Thoughts

Has the LHC Destroyed the Earth?

  • Create new account
  • Reset your password
RSS feed
Powered by Drupal