Skip to content

Instantly share code, notes, and snippets.

@DamianDominoDavis
Last active December 29, 2022 20:55
Show Gist options
  • Save DamianDominoDavis/3b6c544f9c6720220e79e5c9a600658d to your computer and use it in GitHub Desktop.
Save DamianDominoDavis/3b6c544f9c6720220e79e5c9a600658d to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name KoL Marketplace Rediercter
// @description dead flash graphs URLs replaced with fancy html5 URLs
// @version 1.0
// @author Damian Domino Davis (#2602681)
// @match *://kol.coldfront.net/newmarket*
// @match *://kol.coldfront.net/default/itemgraph*
// @icon https://www.google.com/s2/favicons?sz=64&domain=coldfront.net
// @run-at document-start
// ==/UserScript==
// A Greasemonkey/Tampermonkey extension to unbreak links on the KOL Marketplace Tracker
if ( window.location.host == 'kol.coldfront.net' ) {
if (window.location.pathname == '/newmarket/') {
window.location.replace('https://g1wjmf0i0h.execute-api.us-east-2.amazonaws.com/default/itemindex');
}
else if (window.location.pathname == '/newmarket/newmarket/itemgraph.php') {
let marketplace = window.location.protocol
+ '//g1wjmf0i0h.execute-api.us-east-2.amazonaws.com'
+ (''+window.location.pathname).replaceAll('newmarket/newmarket','default').replace('.php','')
+ window.location.search;
window.location.replace(marketplace);
}
else if (window.location.pathname == '/default/itemgraph') {
let marketplace = window.location.protocol
+ '//g1wjmf0i0h.execute-api.us-east-2.amazonaws.com'
+ (''+window.location.pathname)
+ window.location.search;
window.location.replace(marketplace);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment