prototype.js抑制

【「@run-at document-start」必須】Prototype JavaScript framework (prototype.js) による組み込みメソッド破壊について、Tampermonkey、およびViolent monkeyが干渉するバグを回避します。

Bu script direkt olarak kurulamaz. Başka scriptler için bir kütüphanedir ve meta yönergeleri içerir // @require https://update.greasyfork.org/scripts/17932/140950/prototypejs%E6%8A%91%E5%88%B6.js

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name        prototype.js抑制
// @description 【「@run-at document-start」必須】Prototype JavaScript framework (prototype.js) による組み込みメソッド破壊について、Tampermonkey、およびViolent monkeyが干渉するバグを回避します。
// @version     1.0.1
// @license     Mozilla Public License Version 2.0 (MPL 2.0); https://www.mozilla.org/MPL/2.0/
// @compatible  Firefox Greasemonkeyの場合は「@grant none」以外の指定で回避できるため、同環境では実行しないようにしています。
// @compatible  Opera
// @compatible  Chrome
// @run-at      document-start
// @author      100の人
// @homepage    https://greasyfork.org/users/137
// ==/UserScript==

(function () {
'use strict';

if (GM_info.scriptHandler && GM_info.scriptHandler !== 'Greasemonkey' && !Object.extend) {
	Object.defineProperty(Array, 'from', { writable: false });
	Object.defineProperty(Object, 'extend', {
		writable: false,
		value: function (destination, source) {
			for (let property in source) {
				let descriptor;
				if (property === 'toJSON' || property !== 'sub' && (descriptor = Object.getOwnPropertyDescriptor(destination, property)) && !descriptor.enumerable) {
					continue;
				}
				destination[property] = source[property];
			}
			return destination;
		},
	});
}

})();