Skip to content

Commit 6ede4b9

Browse files
committed
set page title
1 parent e7946ca commit 6ede4b9

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

assets_js_bitrequest_core.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,8 +1117,9 @@ function loadfunction(pagename, thisevent) {
11171117
return
11181118
}
11191119
loadpageevent(pagename);
1120-
let title = translate(pagename) + " | " + glob_apptitle;
1121-
settitle(title);
1120+
const page_tl = translate(pagename),
1121+
page_title = (page_tl) ? page_tl : pagename;
1122+
settitle(page_title);
11221123
cancel_url_dialogs();
11231124
}
11241125

@@ -4167,7 +4168,7 @@ function appendrequest(rd) {
41674168
}) + "</span> <span class='rq_day'>" + localtimeobject.getDate() + "</span>",
41684169
ptsformatted = fulldateformat(new Date(paymenttimestamp - glob_timezone), glob_langcode, true),
41694170
amount_short_rounded = amountshort(amount, receivedamount, fiatvalue, iscrypto),
4170-
amount_short_span = (insufficient === true) ? " (" + amount_short_rounded + " " + uoa_upper + " short)" : "",
4171+
amount_short_span = (insufficient === true) ? " (" + amount_short_rounded + " " + uoa_upper + " " + translate("amountshort") + ")" : "",
41714172
amount_short_cc_span = (iscrypto === true) ? amount_short_span : "",
41724173
created = (requestdate) ? requestdateformatted : "<strong>unknown</strong>",
41734174
fiatvaluebox = (iscrypto === true || !fiatvalue) ? "" : "<li class='payday pd_fiat'><strong>" + translate("fiatvalueon") + "<span class='pd_fiat'> " + ptsformatted + "</span> :</strong><span class='fiatvalue'> " + fiatvalue_rounded + "</span> " + currencyname + "<div class='show_as amountshort'>" + amount_short_span + "</div></li>",
@@ -4603,8 +4604,9 @@ function loadertext(text) {
46034604
}
46044605

46054606
function settitle(title) {
4606-
glob_titlenode.text(title);
4607-
glob_ogtitle.attr("content", title);
4607+
const page_title = title + " | " + glob_apptitle;
4608+
glob_titlenode.text(page_title);
4609+
glob_ogtitle.attr("content", page_title);
46084610
}
46094611

46104612
function all_pinpanel(cb, top, set) {

assets_js_bitrequest_payments.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ function continue_paymentfunction() {
667667
},
668668
lnd_switch = (payment == "bitcoin") ? (isrequest && !ln) ? "" : "<div id='lightning_switch' title='lightning' class='lnswitch'><span class='icon-power'></span></div>" : "",
669669
ndef_switch = (payment == "bitcoin" && glob_ndef) ? "<div id='ndef_switch' title='Tap to pay' class='lnswitch'><span class='icon-connection'></span></div>" : "";
670-
settitle(pagename + " | " + glob_apptitle);
670+
settitle(pagename);
671671
glob_paymentdialogbox.append("<div id='request_back' class='share_request dialogstyle'></div><div id='request_front' class='dialogstyle'><div id='xratestats'><span id='rq_errlog'></span></div>" + ndef_switch + lnd_switch + "</div>").attr(payment_attributes);
672672
// Extend global request object
673673
$.extend(request, extend_data);
@@ -1610,8 +1610,7 @@ function pickcurrency() {
16101610
"payment": payment,
16111611
"newccvalue": nccvalstrip,
16121612
"newccsymbol": newccsymbol
1613-
}),
1614-
title = pagename + " | " + glob_apptitle;
1613+
});
16151614
request.uoa = nextcurrency,
16161615
request.amount = nccvalstrip,
16171616
request.iscrypto = iscrypto;
@@ -1622,7 +1621,7 @@ function pickcurrency() {
16221621
glob_paymentdialogbox.attr("class", helper.requestclass + dialogclass + helper.iszeroclass);
16231622
main_input_focus();
16241623
set_edit(href);
1625-
settitle(title);
1624+
settitle(pagename);
16261625
rendercpooltext(newccsymbol, newccrate);
16271626
});
16281627
}
@@ -1772,12 +1771,11 @@ function updatecpool(thisamount, thisrate, ccvalue) {
17721771
"payment": payment,
17731772
"newccvalue": thisamount,
17741773
"newccsymbol": currency
1775-
}),
1776-
title = pagename + " | " + glob_apptitle;
1774+
});
17771775
helper.currencylistitem.data("url", href);
17781776
request.amount = thisamount;
17791777
set_edit(href);
1780-
settitle(title);
1778+
settitle(pagename);
17811779
glob_blocktyping = false;
17821780
}
17831781

@@ -3130,7 +3128,7 @@ function updaterequest(ua, save) {
31303128
rl_iscrypto = rldata.iscrypto,
31313129
rl_uoa = rldata.uoa,
31323130
amount_short_rounded = amountshort(rl_amount, ua.receivedamount, ua.fiatvalue, rl_iscrypto),
3133-
amount_short_span_text = " (" + amount_short_rounded + " " + rl_uoa.toUpperCase() + " " + translate("amountshort");
3131+
amount_short_span_text = " (" + amount_short_rounded + " " + rl_uoa.toUpperCase() + " " + translate("amountshort") + ")";
31343132
amount_short_span.text(amount_short_span_text).addClass("show_as");
31353133
} else {
31363134
amount_short_span.removeClass("show_as");

0 commit comments

Comments
 (0)