added script
This commit is contained in:
21
dist/hungergames-brantsteele-webp.user.js
vendored
Normal file
21
dist/hungergames-brantsteele-webp.user.js
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
// ==UserScript==
|
||||||
|
// @name Hunger Games BrantSteele WebP Support
|
||||||
|
// @namespace zomo.dev
|
||||||
|
// @match https://brantsteele.net/hungergames/edit.php
|
||||||
|
// @version 1.0
|
||||||
|
// @description fix the form validator to allow webp images
|
||||||
|
// @runat document-end
|
||||||
|
// @downloadURL https://git.zomo.dev/zomo/browser-scripts/raw/branch/main/dist/hungergames-brantsteele-webp.user.js
|
||||||
|
// @supportURL https://git.zomo.dev/zomo/browser-scripts/issues
|
||||||
|
// @homepageURL https://git.zomo.dev/zomo/browser-scripts
|
||||||
|
// ==/UserScript==
|
||||||
|
validateForm = Function(
|
||||||
|
validateForm
|
||||||
|
.toString()
|
||||||
|
.replace(/^function validateForm\(\)(.|\n)*?\{/, '')
|
||||||
|
.replace(/\}$/, '')
|
||||||
|
.replaceAll(
|
||||||
|
'var regexp = /(https?:\\/\\/.*\\.(?:png|jpg|gif|bmp|jpeg))$/i',
|
||||||
|
'var regexp = /(https?:\\/\\/.*\\.(?:png|jpg|gif|bmp|jpeg|webp))$/i'
|
||||||
|
)
|
||||||
|
)
|
||||||
1587
package-lock.json
generated
Normal file
1587
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -5,6 +5,9 @@ Requires Violentmonkey (or Tampermonkey etc): [Chrome](https://chrome.google.com
|
|||||||
<!-- START INSTALL LINKS -->
|
<!-- START INSTALL LINKS -->
|
||||||
## Installs
|
## Installs
|
||||||
|
|
||||||
|
- [Hunger Games BrantSteele WebP Support](https://git.zomo.dev/zomo/browser-scripts/raw/branch/main/dist/hungergames-brantsteele-webp.user.js)
|
||||||
|
- zomo.dev 1.0
|
||||||
|
- fix the form validator to allow webp images
|
||||||
- [OptiFine Download Links](https://git.zomo.dev/zomo/browser-scripts/raw/branch/main/dist/optifine-download-links.user.js)
|
- [OptiFine Download Links](https://git.zomo.dev/zomo/browser-scripts/raw/branch/main/dist/optifine-download-links.user.js)
|
||||||
- zomo.dev 1.0
|
- zomo.dev 1.0
|
||||||
- automatically grab optifine links through the ads
|
- automatically grab optifine links through the ads
|
||||||
|
|||||||
12
scripts/hungergames-brantsteele-webp/main.ts
Normal file
12
scripts/hungergames-brantsteele-webp/main.ts
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
declare var validateForm: Function
|
||||||
|
|
||||||
|
validateForm = Function(
|
||||||
|
validateForm
|
||||||
|
.toString()
|
||||||
|
.replace(/^function validateForm\(\)(.|\n)*?\{/, '')
|
||||||
|
.replace(/\}$/, '')
|
||||||
|
.replaceAll(
|
||||||
|
'var regexp = /(https?:\\/\\/.*\\.(?:png|jpg|gif|bmp|jpeg))$/i',
|
||||||
|
'var regexp = /(https?:\\/\\/.*\\.(?:png|jpg|gif|bmp|jpeg|webp))$/i'
|
||||||
|
)
|
||||||
|
)
|
||||||
9
scripts/hungergames-brantsteele-webp/meta.json
Normal file
9
scripts/hungergames-brantsteele-webp/meta.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://git.zomo.dev/zomo/browser-scripts-builder/raw/branch/main/meta.schema.json",
|
||||||
|
"name": "Hunger Games BrantSteele WebP Support",
|
||||||
|
"namespace": "zomo.dev",
|
||||||
|
"match": "https://brantsteele.net/hungergames/edit.php",
|
||||||
|
"version": "1.0",
|
||||||
|
"description": "fix the form validator to allow webp images",
|
||||||
|
"runat": "document-end"
|
||||||
|
}
|
||||||
17
scripts/hungergames-brantsteele-webp/tsconfig.json
Normal file
17
scripts/hungergames-brantsteele-webp/tsconfig.json
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es2021",
|
||||||
|
"module": "commonjs",
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"strict": true,
|
||||||
|
"noImplicitReturns": true,
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"noUnusedParameters": true,
|
||||||
|
"types": [
|
||||||
|
"../../node_modules/@types/greasemonkey",
|
||||||
|
"../../node_modules/browser-scripts-builder"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user