Skip to content

Instantly share code, notes, and snippets.

/**
* class.js
* @author Dmitry A. Soshnikov
*/
function Class(params) {
/**
* Constructor function
* If not specified, use default
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
/**
* class.js
* @author Dmitry A. Soshnikov
*/
function Class(params) {
/**
* Constructor function
* If not specified, use default
var uriString = "https://addons.mozilla.org/firefox/downloads/latest/413716/addon-413716-latest.xpi";
var referer = "https://addons.mozilla.org/";
var private = false; // Отсылать запрос в приватном режиме
var ios = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
var uri = ios.newURI(uriString, null, null);
var scheme = uri.scheme && uri.scheme.toLowerCase();
var channel = scheme == "about" && "nsIAboutModule" in Components.interfaces
@plugn
plugn / buster.js
Created January 25, 2013 12:00 — forked from cjohansen/buster.js
var config = exports; // Vanity
config["Browser tests"] = {
environment: "browser",
sources: ["strftime.js"],
tests: ["strftime-test.js"]
};
config["Server tests"] = {
extends: "Browser tests",
@plugn
plugn / inherits.js
Created January 23, 2013 12:50 — forked from kof/inherits.js
/**
* Inherit prototype properties
* @param {Function} ctor
* @param {Function} superCtor
*/
_.mixin({
inherits: (function(){
function noop(){}
function ecma3(ctor, superCtor) {