If object does not have key, add it.
La data de
Acest script nu ar trebui instalat direct. Aceasta este o bibliotecă pentru alte scripturi care este inclusă prin directiva meta a // @require https://update.greasyfork.org/scripts/427473/937455/object_setDefault.js
// ==UserScript==
// @name object_setDefault
// @namespace bo.gd.an[at]rambler.ru
// @version 0.2
// @description If object does not have key, add it.
// @author Bogudan
// @license LGPLv3
// @include https://localhost/
// ==/UserScript==
Object.prototype.setDefault = function (key, value) {
if (!(key in this))
this [key] = value;
};