Code Monkey home page Code Monkey logo

gbf-bookmarklet's People

Contributors

minimalist3 avatar

Watchers

 avatar

Forkers

luminairre

gbf-bookmarklet's Issues

Listener for listing character and import to website

Hey, here's a short snippet you can use to hijack XHR and create an object of characters that you can send to your website.

Disclaimer: I'm not sure if this can be detected by the anti-cheat or not.
Script is provided as is and you can use it however you want.

// create the variables
// characters will be stored in list as object[charaId] = uncap level
// reason is that so if the user is going back and forth on the page, it won't keep adding stuff to the collector variable
var send = window.XMLHttpRequest.prototype.send,onReadyStateChange, clist = {};

// lets replace the send
function sendReplacement(data) {
    if(this.onreadystatechange) {
        this._onreadystatechange = this.onreadystatechange;
    }
    this.onreadystatechange = onReadyStateChangeReplacement;

    return send.apply(this, arguments);
}

function onReadyStateChangeReplacement() {
    if(this.readyState == 4) {
       // create temporary variable
        var clisttemp = JSON.parse(this.response);
        if(clisttemp && clisttemp.list) {
            for(var ix = 0; ix < clisttemp.list.length; ix++) {
                // loop each item and assign it to character list
                clist[clisttemp.list[ix].master.id] = clisttemp.list[ix].param.evolution;
            }
        }
    }
    
    if(this._onreadystatechange) {
        return this._onreadystatechange.apply(this, arguments);
    }
}

window.XMLHttpRequest.prototype.send = sendReplacement;

It's gonna be a bit complicated, but the idea to use this is:

  1. Go to inventory page, characters
  2. Run this script
  3. Browse every page until the end
  4. Run another script that builds the variable to string and open granblue.party on a new tab

This script will collect information that goes through XHR to a variable, you will probably need some sanitization. This script is still missing contents of the first page, which you can get it from window.Game.view as usual.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.