Skip to content

Instantly share code, notes, and snippets.

@juvian
Created September 17, 2022 06:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juvian/9a4dd93aa28b803b123897baa4da14c0 to your computer and use it in GitHub Desktop.
Save juvian/9a4dd93aa28b803b123897baa4da14c0 to your computer and use it in GitHub Desktop.
Neopets Simple Customization
// ==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