Skip to content

Instantly share code, notes, and snippets.

@romer romer/export-friend-stone.js Secret
Last active Apr 3, 2020

Embed
What would you like to do?
granbluefantasy export friend stone
javascript:(function (logic) {
function copyToClipboard(text) {
if (!text) {
return;
}
var element = document.createElement("TEXTAREA");
document.body.appendChild(element);
element.value = text;
element.select();
try {
document.execCommand("copy");
} catch (e) {
return false;
} finally {
element.remove();
}
return true;
}
copyToClipboard(logic())
})(function () {
if (location.hash.indexOf("#profile/") === false) {
return
}
var result = [];
$('.prt-fix-support-wrap .prt-fix-support').each(function () {
var $spec = $(this).find('.prt-fix-spec'),
name = $spec.find('.prt-fix-name').text(),
lv = name.split(" ")[0];
name = name.replace(/Lv\d+\s*/, '');
result.push({
name: name,
level: parseInt(lv.replace('Lv', ''), 10),
isMax: 0 < $spec.find('.bless-rank1-style').length,
isFinal4: 0 < $spec.find('.bless-rank2-style').length,
isFinal5: 0 < $spec.find('.bless-rank3-style').length
});
});
var outputs = [];
result.forEach(function (v) {
outputs.push(v.name === "" ? '' : (
v.isFinal5 ? '★★' :
(v.isFinal4 ? '★' :
(v.isMax ? '' : '▲')
)
) + v.name);
});
return outputs.join("\t")
});
javascript:(function(b){function a(f){if(!f){return}var c=document.createElement("TEXTAREA");document.body.appendChild(c);c.value=f;c.select();try{document.execCommand("copy")}catch(d){return false}finally{c.remove()}return true}a(b())})(function(){if(location.hash.indexOf("#profile/")===false){return}var a=[];$(".prt-fix-support-wrap .prt-fix-support").each(function(){var e=$(this).find(".prt-fix-spec"),c=e.find(".prt-fix-name").text(),d=c.split(" ")[0];c=c.replace(/Lv\d+\s*/,"");a.push({name:c,level:parseInt(d.replace("Lv",""),10),isMax:0<e.find(".bless-rank1-style").length,isFinal4:0<e.find(".bless-rank2-style").length,isFinal5:0<e.find(".bless-rank3-style").length})});var b=[];a.forEach(function(c){b.push(c.name===""?"":(c.isFinal5?"★★":(c.isFinal4?"★":(c.isMax?"":"▲")))+c.name)});return b.join("\t")});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.