Skip to content

Instantly share code, notes, and snippets.

@Baw-Appie
Created February 21, 2023 06:44
Show Gist options
  • Star 23 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Baw-Appie/e262e952f03e82608d899e5e677106a7 to your computer and use it in GitHub Desktop.
Save Baw-Appie/e262e952f03e82608d899e5e677106a7 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name ASTx2 Emulator
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author @BawAppie
// @match https://*/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=ahnlab.com
// @grant none
// ==/UserScript==
if(window.jQuery) jQuery(document).ready(() => {
if(!window.$ASTX2) return
const fakePlatformGetter = () => "Mac"
if (Object.defineProperty) {
Object.defineProperty(navigator, "platform", { get: fakePlatformGetter });
Object.defineProperty(Navigator.prototype, "platform", { get: fakePlatformGetter });
} else if (Object.prototype.__defineGetter__) {
navigator.__defineGetter__("platform", fakePlatformGetter);
Navigator.prototype.__defineGetter__("platform", fakePlatformGetter);
}
jQuery.ajaxSetup({
beforeSend: (e, data) => {
data.url = data.url.replace("127.0.0.1:55920", "astx2-emulator.appie.dev").replace("lx.astxsvc.com:55920", "astx2-emulator.appie.dev")
return true
}
})
})
@Baw-Appie
Copy link
Author

이 유저 스크립트에 관심 가져주시는 분이 많아서 감사드립니다.
일부 사이트에서 작동 안하는 문제가 있어 확장 프로그램으로 대신 만들었습니다.
물론 이 유저 스크립트를 고치는 방법도 있겠지만, jQuery와 싸우기는 싫습니다.

https://github.com/Baw-Appie/SafeTransaction
감사합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment