`;
document.write(output);
}
// Extract query strings from URL
function getUrlVars() {
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for(var i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}
// Copy given contents to clipboard
function copyPromoCode(contents) {
navigator.clipboard.writeText(contents);
var label_codeCopied = outputTextByLang('Promo Code copied: ', 'プロモコードをコピーしました:') + ' ' +
'
' + contents + '
';
copyContent_showPopup(label_codeCopied);
}
// Show popup which fades after a given number of miliseconds
function copyContent_showPopup(contents, showDuration = 3000) {
// Check if popup entry already exists
if ($('#copyPopup').length != 0) {
// Refresh visibility of existing popup
$('#copyPopup').fadeIn(0);
} else {
// Create new popup instance
$('body').prepend(`
` + contents + `
`);
}
$("#copyPopup").delay(showDuration).fadeOut(500);
}
$(document).ready(function () {
checkForCustomA2C();
});
$(window).on('load', function() {
setMainDisplacement();
});
// function set30Command () {
// if (window.addEventListener) {
// var keys = [],
// kCommand = "38,38,40,40,37,39,37,39,66,65";
// window.addEventListener("keydown", function(e) {
// keys.push(e.keyCode);
// // Run once key inputs fully match the kCommand array entries
// if (keys.toString().indexOf(kCommand) >= 0) {
// keys = []; // Reset input keys
// };
// }, true);
// }
// };