Merge pull request 'staging' (#20) from staging into master
Reviewed-on: http://localhost:3000/zino/seatmapv2/pulls/20
This commit is contained in:
@@ -15,18 +15,21 @@ window.addEventListener('load', () => {
|
||||
// Parse (hidden) inputs and their values
|
||||
const content: string = new XMLSerializer().serializeToString(document);
|
||||
inputsWithValue = { ...inputsWithValue, ...Parser.getInputs(content) };
|
||||
if (jQuery("#get_flash").length) jQuery("#get_flash").hide();
|
||||
|
||||
Utils.consoleLog(inputsWithValue);
|
||||
Utils.consoleLog(`trxstate: ${inputsWithValue["trxstate"]}`);
|
||||
|
||||
// "posturl" in function showMap() only available if "pvmapse" PVO code is true.
|
||||
// "pvmapse" false disables seatmap
|
||||
// "posturl" in function showMap() only available if "pvmapse" is true, false disables seatmap
|
||||
const posturlAvail: boolean = /posturl:"(.+?)"/.test(content);
|
||||
const couponCodeBoxAvail: boolean = !!jQuery("#coupon_code_box").length;
|
||||
const couponSuccessfull: boolean = !!jQuery("#coupon_successful").length;
|
||||
|
||||
Utils.consoleLog(`couponCodeBoxAvail: ${couponCodeBoxAvail}`);
|
||||
Utils.consoleLog(`posturl available: ${posturlAvail}`);
|
||||
|
||||
// Only inject on page with trxstate 20 and if seatmap is enabled with PVO code "pvmapse"
|
||||
if (inputsWithValue["trxstate"] !== "20" || posturlAvail === false)
|
||||
if (inputsWithValue["trxstate"] !== "20" || posturlAvail === false || couponCodeBoxAvail === true || couponSuccessfull === true)
|
||||
return;
|
||||
|
||||
// Inject parent CSS
|
||||
|
||||
Reference in New Issue
Block a user