Created
September 17, 2022 06:51
-
-
Save juvian/9a4dd93aa28b803b123897baa4da14c0 to your computer and use it in GitHub Desktop.
Neopets Simple Customization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Neopets Simple Customization | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Allows calling ncmall from my site | |
// @author Juvian | |
// @match https://eden-item-guide.glitch.me/neo/customization* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=glitch.me | |
// @grant GM_xmlhttpRequest | |
// @grant unsafeWindow | |
// @connect ncmall.neopets.com | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
unsafeWindow.getPetData = (data) => new Promise((onload, onerror) => GM_xmlhttpRequest({method: "POST", url: "http://ncmall.neopets.com/mall/ajax/petview/getPetData.php", responseType: "json", anonymous: true, data, onload, onerror, headers: { "Content-Type": "application/x-www-form-urlencoded" }})) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment