Skip to content

Instantly share code, notes, and snippets.

@symm
symm / scram29c3.js
Created December 7, 2013 13:15
JavasScript text scrambler effect from the old 29c3 website
String.prototype.replaceAt=function(index, char ) { return this.substr(0, index) + char + this.substr(index+char.length); }
String.prototype.replace2At=function(index, char1, char2 ) { return this.substr(0, index) + char1 + char2 + this.substr(index+char1.length+char2.length); }
function scram29c3run() {
var elem = document.getElementById( 'header-29c3-scramble' );
if ( elem ) { var scram = new scram29c3( elem ); scram.run(); } else
{ setTimeout( scram29c3run, 500 ); }
elem = document.getElementById( 'header-29c3-scramble2' );
if ( elem ) { var scram = new scram29c3( elem ); scram.run(); }
}