Greasy Fork is available in English.
Library to hold common prototype extensions for your Furaffinity Script
此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.greasyfork.org/scripts/525666/1549449/Furaffinity-Prototype-Extensions.js
- // ==UserScript==
- // @name Furaffinity-Prototype-Extensions
- // @namespace Violentmonkey Scripts
- // @grant GM_info
- // @version 1.0.1
- // @author Midori Dragon
- // @description Library to hold common prototype extensions for your Furaffinity Script
- // @icon https://www.furaffinity.net/themes/beta/img/banners/fa_logo.png
- // @license MIT
- // @homepageURL https://greasyfork.org/scripts/525666-furaffinity-prototype-extensions
- // @supportURL https://greasyfork.org/scripts/525666-furaffinity-prototype-extensions/feedback
- // ==/UserScript==
- // jshint esversion: 8
- (() => {
- "use strict";
- var __webpack_modules__ = {
- 177: () => {
- Node.prototype.insertBeforeThis = function(newNode) {
- var _a;
- null === (_a = this.parentNode) || void 0 === _a || _a.insertBefore(newNode, this);
- };
- Node.prototype.insertAfterThis = function(newNode) {
- var _a;
- null === (_a = this.parentNode) || void 0 === _a || _a.insertBefore(newNode, this.nextSibling);
- };
- Node.prototype.getIndexOfThis = function() {
- if (null == this.parentNode) return -1;
- return Array.from(this.parentNode.children).indexOf(this);
- };
- Node.prototype.readdToDom = function() {
- var _a;
- const clone = this.cloneNode(false);
- null === (_a = this.parentNode) || void 0 === _a || _a.replaceChild(clone, this);
- return clone;
- };
- },
- 536: () => {
- String.prototype.trimEnd = function(toTrim) {
- if (null == toTrim) return "";
- if ("" === toTrim || "" === this) return this.toString();
- let r###lt = this.toString();
- for (;r###lt.endsWith(toTrim); ) r###lt = r###lt.slice(0, -toTrim.length);
- return r###lt;
- };
- String.prototype.trimStart = function(toTrim) {
- if (null == toTrim) return "";
- if ("" === toTrim || "" === this) return this.toString();
- let r###lt = this.toString();
- for (;r###lt.startsWith(toTrim); ) r###lt = r###lt.slice(toTrim.length);
- return r###lt;
- };
- }
- }, __webpack_module_cache__ = {};
- function __webpack_require__(moduleId) {
- var cachedModule = __webpack_module_cache__[moduleId];
- if (void 0 !== cachedModule) return cachedModule.exports;
- var module = __webpack_module_cache__[moduleId] = {
- exports: {}
- };
- __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
- return module.exports;
- }
- __webpack_require__.n = module => {
- var getter = module && module.__esModule ? () => module.default : () => module;
- __webpack_require__.d(getter, {
- a: getter
- });
- return getter;
- };
- __webpack_require__.d = (exports, definition) => {
- for (var key in definition) if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
- enumerable: true,
- get: definition[key]
- });
- };
- __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
- __webpack_require__(177), __webpack_require__(536);
- })();