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'
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user