[quote=dov]What the hell, I’ve upgraded this bookmark javascript code.
It now prints:
- BDR[/li][li]Notability[/li][li]Making Waves[/li][li]Making Waves CP towards next level[/li][li]Making Waves level needed for next Notability.
It also handles Making Waves over 50 (in case anyone needs that).
As before, just save this as a bookmark, and don’t forget to reload the page before calling this, as this relied on the sidebar info.
Enjoy and feel free to improve!
[/quote]
For some reason, the forum coding gets rid of some necessary semicolons. Copy/paste this into notepad, and add a semicolon at the end of each of the "var" lines in the top section (after the quote). You can then paste from there into the bookmark URL line :)
javascript: (function() {
var notability_id = "infoBarQLevel101305"
var MW_id = "infoBarQLevel545"
var MW_percent_id = "infoBarQBar545"
var Bizarre_id = "infoBarQLevel958"
var Bizarre_bonus_id = "infoBarBonusPenalty958"
var Dreaded_id = "infoBarQLevel957"
var Dreaded_bonus_id = "infoBarBonusPenalty957"
var Respectable_id = "infoBarQLevel950"
var Respectable_bonus_id = "infoBarBonusPenalty950"
var element;
var curr_no = 0;
var curr_MW = 0;
var CP_perc = 0;
var BDR_b = 0;
var BDR_d = 0;
var BDR_r = 0;
element = document.getElementById(notability_id);
if (element) {
curr_no = parseInt(element.innerHTML);
}
var next_no = curr_no + 1;
element = document.getElementById(MW_id);
if (element) {
curr_MW = parseInt(element.innerHTML);
}
var next_MW = curr_MW + 1;
var CP_per_level = Math.min(next_MW, 50);
element = document.getElementById(MW_percent_id);
if (element) {
CP_perc = parseFloat(element.getAttribute("width")) / 100.0;
}
var curr_CP = Math.round(CP_per_level * CP_perc);
var need_CP = CP_per_level - curr_CP;
element = document.getElementById(Bizarre_id);
if (element) {
BDR_b = parseInt(element.innerHTML);
element = document.getElementById(Bizarre_bonus_id);
if (element) {
var bonus = parseInt(element.innerHTML);
if (bonus) {
BDR_b = BDR_b + bonus;
}
}
}
element = document.getElementById(Dreaded_id);
if (element) {
BDR_d = parseInt(element.innerHTML);
element = document.getElementById(Dreaded_bonus_id);
if (element) {
var bonus = parseInt(element.innerHTML);
if (bonus) {
BDR_d = BDR_d + bonus;
}
}
}
element = document.getElementById(Respectable_id);
if (element) {
BDR_r = parseInt(element.innerHTML);
element = document.getElementById(Respectable_bonus_id);
if (element) {
var bonus = parseInt(element.innerHTML);
if (bonus) {
BDR_r = BDR_r + bonus;
}
}
}
var BDR = BDR_b + BDR_d + BDR_r;
var need_MW = (curr_no * 4) + 20 - BDR;
alert(
"BDR is " + BDR + "\n"
- "Notability is " + curr_no + "\n"
- "Required MW for Notability " + next_no + " is " + need_MW + "\n"
- "Making Waves is " + curr_MW + " and " + curr_CP + " CP (" + need_CP + " more needed to reach level " + next_MW + ")\n"
) } )();
edited by Socotra on 4/19/2018