$(function() {
var grid_url = 'https://gridsingapore.com/';
var voucher_url = '/voucher';
// registration page quick links
var $signup = $('#form-signup');
if($signup.length > 0){
$signup.append(`
`);
}
// main game page quick links
var $bottom = $('.bottom_ui_wrapper');
if($bottom.length > 0){
$bottom.append(`
`)
$('#grid_url_btn').on('click', (e)=>{
var win = window.open(grid_url, '_blank');
if (win) {
win.focus();
}
});
$bottom.append(`
`)
$('#grid_voucher_btn').on('click', (e)=>{
var win = window.open(window.location.origin + voucher_url, '_blank');
if (win) {
win.focus();
}
});
}
if(!window.location.pathname.includes('/voucher') && !window.location.pathname.includes('/my') ){
var $nav = $('.navbar-nav');
if($nav.length >0){
// 2nd item
$(`Deals`).insertAfter(".nav-item:first")
// first item
$(`Website`).insertAfter(".nav-item:first")
$('.nav-link[alt=Home]').text('Glow in the GR.ID');
}
$('.nav-link:not([href="/"]):not([href="/logout"])').attr('target','_blank');
$('.popup-daily-checkin-caption').text('Check in daily to earn points!')
}
var $title = $('.main-game-wrapper h5:first');
if($title.length > 0){
$title.text('');
}
var $chanceLabel = $('.main-game-wrapper > .text-center > .text-bold:last');
if($chanceLabel.length > 0){
$chanceLabel.html( $chanceLabel.html().replace('Tries Left', 'Daily Attempt') );
}
var $pointsLabel = $('.main-game-wrapper > .text-center > .text-bold:first');
if($pointsLabel.length > 0){
$pointsLabel.append('pts');
}
});