Skip to content

Instantly share code, notes, and snippets.

@miraizu-k
Created February 18, 2023 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miraizu-k/708e1e10e65c5533bacb82c74050f556 to your computer and use it in GitHub Desktop.
Save miraizu-k/708e1e10e65c5533bacb82c74050f556 to your computer and use it in GitHub Desktop.
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 = [], isList = $('.pop-supporter-summon').length > 0;
$('#prt-support-summon-list .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
});
});
if (isList) {
var last = result.pop(), last2 = result.pop();
result.unshift(last);
result.unshift(last2);
}
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=[],d=$(".pop-supporter-summon").length>0;$("#prt-support-summon-list .prt-fix-support-wrap .prt-fix-support").each(function(){var h=$(this).find(".prt-fix-spec"),f=h.find(".prt-fix-name").text(),g=f.split(" ")[0];f=f.replace(/Lv\d+\s*/,"");a.push({name:f,level:parseInt(g.replace("Lv",""),10),isMax:0<h.find(".bless-rank1-style").length,isFinal4:0<h.find(".bless-rank2-style").length,isFinal5:0<h.find(".bless-rank3-style").length})});if(d){var c=a.pop(),b=a.pop();a.unshift(c);a.unshift(b)}var e=[];a.forEach(function(f){e.push(f.name===""?"":(f.isFinal5?"★★":(f.isFinal4?"★":(f.isMax?"":"▲")))+f.name)});return e.join("\t")});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment