Skip to content

Instantly share code, notes, and snippets.


Christoph Nakazawa cpojer

View GitHub Profile
View UserAgent.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script src="ua.js" type="text/javascript"></script>
View gist:361474
* Use the Slick Selector Engine with MooTools Core 1.2.4 by @cpojer
* Tested with Slick branch "develop":
* How to use:
* - Download Slick from github and include Slick.Parser.js and Slick.Finder.js
* - Remove Selectors.js
* - Optionally you can remove all the methods mentioned below from your mootools-core build
View gist:440783
# Configuration File for JavaScript Lint 0.2.6
# Developed by Matthias Miller (
# This configuration file can be used to lint a collection of scripts, or to enable
# or disable warnings for scripts that are linted via the command line.
#### Feel free to experiment with enabling/disabling individual warnings to
View Toy.js
JavaScript Implementation of the TOY CPU which we used in the
lecture RECHNERNETZE UND -ORGANISATION (Computer Networks and Organization)
More Information:
Instruction Set:
This implementation comes with a built-in boot loader.
It expects files in the following format:
line 1: CAFE
View Element.Slide.js
var className = 'slide',
classNameIn = 'in',
key = 'slide:styles',
active = 'slide:active',
chain = 'slide:chain';
var properties = {
height: 0,
View MobileClick.js
if (!Browser.Features.Touch) return;
var start, end, moved;
var events = {
touchstart: function(event){
moved = false;
View Element.js
// Upgrade from MooTools Core 1.2 to MooTools Core 1.3
// Brings compatibility for Element.set and Element.get with multipe arguments.
// Use at your own risk; if cou can - fix your code and do not use this script.
// -- @cpojer
cpojer / Initiatable.js
Created Feb 4, 2011
Sugar for cross-module communication without knowledge of each other.
View Initiatable.js
this.Initiatable = new Class({
isInitiatable: true,
initiator: null,
setInitiator: function(initiator){
this.initiator = initiator || null;
View Listener.js
// Element Listener Mixin
var setup = function(){
var element = this.toElement(),
listener = new Events,
removeEvent = listener.removeEvent;
listener.removeEvent = function(key, value){
element.removeEvent(key, value);, key, value);
View Listener.js
// Element Listener Mixin
var property = '$listener';
var setup = function(element){
var listener = new Events, removeEvent = listener.removeEvent;
listener.removeEvent = function(key, value){, key, value);
element.removeEvent(key, value);
You can’t perform that action at this time.