Skip to content

Commit 3008270

Browse files
Update main.js
1 parent fb95ab8 commit 3008270

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

js/main.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -765,10 +765,13 @@ function showSellWidget() {
765765
sellWidget.show();
766766
}
767767

768-
function handlePageRedirect(isBuyPage) {
768+
function handlePageRedirect(isBuyPage, isSellPage) {
769769
if (isBuyPage === undefined) {
770770
isBuyPage = false;
771771
}
772+
if (isSellPage === undefined) {
773+
isSellPage = false;
774+
}
772775

773776
$.get('/cdn-cgi/trace')
774777
.done(function(response) {
@@ -790,18 +793,25 @@ function handlePageRedirect(isBuyPage) {
790793
} else {
791794
showBuyWidget();
792795
}
796+
} else if (isSellPage) {
797+
if (data.loc === 'GB') {
798+
window.location.href = '/';
799+
} else {
800+
showSellWidget();
801+
}
793802
} else {
794-
if (data.loc === 'GB') {
803+
if (data.loc === 'GB') {
795804
$('#buybitcoinbutton').hide();
796805
$('#buybitcoinmenulink').hide();
797806
$('#buybitcoinfootermenulink').hide();
798807
$('#getstartedbuybutton').hide();
808+
$('#sellbitcoinmenulink').hide();
809+
$('#sellbitcoinfootermenulink').hide();
799810
}
800811
}
801812
});
802813
}
803814

804-
805815
function sortTableColumn(selectedOption) {
806816
var tableAccordion = document.getElementById('tableAccordion');
807817
var tableAccordionButton = document.getElementById('tableAccordionButton');

0 commit comments

Comments
 (0)