[Skill calc V.2] Class does not load automatically

Found an error in our database? Please, post it here and we'll try to fix it asap!
Post Reply
Zhumos
Posts: 1
Joined:Sun Sep 06, 2020 4:50 am

[Skill calc V.2] Class does not load automatically

Post by Zhumos » Sun Sep 06, 2020 4:57 am

When loading a build via url, the class is not selected correctly.

Had a quick play with the javascript in there and it looks related to these lines in skillbuilder.min.js:

Code: Select all

$(document).ready(function() {
    setup_calc()
});
if (Object.keys(build_data).length > 0) {
    load_build_data()
}
It looks like the load_build_data() function will be called before setup_calc(). Breaking after setup_calc() and calling load_build_data() from the console then continuing gives me the correct behaviour but that may not be the correct solution.

Edit: Simple tampermonkey script that causes the build to load correctly:

Code: Select all

// ==UserScript==
// @name         New Userscript
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://bdocodex.com/us/skillbuilder/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    load_build_data()
})();

User avatar
Kiriak
Site Admin
Posts: 505
Joined:Wed Sep 11, 2013 10:30 am
Discord:Kiriak#5590

Re: [Skill calc V.2] Class does not load automatically

Post by Kiriak » Sun Sep 06, 2020 8:37 am

Thanks for the report. Fixed that!

Post Reply