tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

bug499169.js (3956B)


      1 // Binary: cache/js-dbg-32-30b481fd82f5-linux
      2 // Flags: -j
      3 //
      4 var Native = function(k) {
      5    var f = k.initialize;
      6    var d = f;
      7    var j = function(n, l, o, m) {
      8        n.prototype[l] = o;
      9    };
     10    d.alias = function(n, l, o) {
     11        n = this.prototype[n]
     12        return j(this, l, n, o);
     13    };
     14    d.implement = function(m, l, o) {
     15        for (var n in m) {
     16            j(this, n, m[n], l);
     17        }
     18    }
     19    return d;
     20 };
     21 (function() {
     22    var a = {
     23        Array: Array,
     24        Function: Function,
     25    };
     26    for (var h in a) {
     27        new Native({
     28            initialize: a[h],
     29        });
     30    }
     31 } ());
     32 Array.alias("forEach", "each");
     33 function $merge() {
     34    var a = Array.prototype.slice.call(arguments);
     35    a.unshift({});
     36    return $mixin.apply(null, a);
     37 }
     38 function $mixin(e) {
     39    for (var d = 1, a = arguments.length; d < a; d++) {
     40        var b = arguments[d];
     41        for (var c in b) {
     42            var g = b[c],
     43            f = e[c];
     44            e[c] = f && $type(g) == "object" && $type(f) == "object" ? $mixin(f, g) : $unlink(g);
     45        }
     46    }
     47 }
     48 function $type(a) {
     49    if (a == undefined) {
     50        return false;
     51    }
     52    if (a.$family) {
     53    }
     54    return typeof a;
     55 }
     56 function $unlink(c) {
     57    if ($type(c) == "object") {
     58        b = {};
     59    }
     60    return b;
     61 }
     62 var Window = new Native({
     63    initialize: function(a) {},
     64 });
     65 Array.implement({
     66    extend: function(c) {
     67        return this;
     68    }
     69 });
     70 Function.implement({
     71    extend: function(a) {
     72        for (var b in a) {
     73            this[b] = a[b];
     74        }
     75        return this;
     76    },
     77    run: function(a, b) {
     78        return this.apply(b, a);
     79    }
     80 });
     81 function Class(b) {
     82    var a = function() {
     83        Object.reset(this);
     84        var c = this.initialize ? this.initialize.apply(this, arguments) : this;
     85    }.extend(this);
     86    a.implement(b);
     87    return a;
     88 }
     89 Object.reset = function(a, c) {
     90    if (c == null) {
     91        for (var e in a) {
     92            Object.reset(a, e);
     93        }
     94    }
     95    switch ($type(a[c])) {
     96    case "object":
     97        var d = function() {};
     98        d.prototype = a[c];
     99        var b = new d;
    100        a[c] = Object.reset(b);
    101    }
    102    return a;
    103 };
    104 (new Native({initialize: Class})).extend({});
    105    function wrap(a, b, c) {
    106        return function() {
    107            var d = c.apply(this, arguments);
    108        }.extend({});
    109    }
    110 Class.implement({
    111    implement: function(a, d) {
    112        if ($type(a) == "object") {
    113            for (var e in a) {
    114                this.implement(e, a[e]);
    115            }
    116        }
    117        var f = Class.Mutators[a];
    118        if (f) {
    119            d = f.call(this, d);
    120        }
    121        var c = this.prototype;
    122        switch ($type(d)) {
    123        case "function":
    124            c[a] = wrap(this, a, d);
    125            break;
    126        case "object":
    127            var b = c[a];
    128            if ($type(b) == "object") {
    129                $mixin(b, d);
    130            } else {
    131                c[a] = $unlink(d);
    132            }
    133        }
    134    }
    135 });
    136 Class.Mutators = {
    137    Extends: function(a) {
    138        this.prototype = new a;
    139    },
    140    Implements: function(a) {
    141        a.each(function(b) {
    142            b = new b;
    143            this.implement(b);
    144        },
    145        this);
    146    }
    147 };
    148 var Events = new Class({});
    149 var Options = new Class({
    150    setOptions: function() {
    151        this.options = $merge.run([this.options].extend(arguments));
    152    }
    153 });
    154 var Autocompleter = {};
    155 Autocompleter.Base = new Class({
    156    Implements: [Options, Events],
    157    options: {},
    158 });
    159 Autocompleter.Ajax = {};
    160 Autocompleter.Ajax.Base = new Class({
    161    Extends: Autocompleter.Base,
    162    options: {
    163        postVar: "value",
    164        onRequest: function(){},
    165    }
    166 });
    167 Autocompleter.Ajax.Json = new Class({
    168    Extends: Autocompleter.Ajax.Base,
    169 });
    170 Autocompleter.JsonP = new Class({
    171    Extends: Autocompleter.Ajax.Json,
    172    options: {
    173        minLength: 1
    174    },
    175    initialize: function(el, url, options) {
    176        this.setOptions({});
    177    }
    178 });
    179 new Autocompleter.JsonP();