I'm developing a UserScript and i thought it would be more time saving to create 2 Prototype functions for Object.
Object.prototype.Count = function() {
    var size = 0, key;
    for (key in this) {
        if (this.hasOwnProperty(key)) {
             size++;
        }
    }
    return size;
};
Object.prototype.GetEntry = function(index) {
    var size = 0, key;
    for (key in this) {
        if (this.hasOwnProperty(key)) {
            if (size == index)
                return this[key];
             size++;
        }
    }
    return null;
};
This 2 Functions are Working perfectly fine on my Debug Console as i Type them, and i use them, however when i'm running my Script, it get some weird errors flooding my console.
Uncaught TypeError: U[a].exec is not a function
Uncaught TypeError: (ec[b] || []).concat is not a function
Uncaught TypeError: X[g].exec is not a function
Uncaught TypeError: (Qn[t] || []).concat is not a function
And more like that, making Site's JavaScript not working.
Without These Functions my Script works like charm. I also have on more Prototype on String, but this is working just fine
String.prototype.between = function(prefix, suffix) {
    s = this;
    var i = s.indexOf(prefix);
    if (i >= 0) {
        s = s.substring(i + prefix.length);
    }
    else {
        return '';
    }
    if (suffix) {
        i = s.indexOf(suffix);
        if (i >= 0) {
            s = s.substring(0, i);
        }
        else {
            return '';
        }
    }
    return s;
}
In my userscript i'm including
- jQuery UI 1.11.4
- jQuery 1.11.1
- Bootstrap 3.3.5
I really don't get what's the problem since on debug console it is working without errors or something.
 
     
    