From 024246d1b3b274dc545b07cd4062cde839a01cbd Mon Sep 17 00:00:00 2001 From: bonjinnorenka <32708102+bonjinnorenka@users.noreply.github.com> Date: Tue, 29 Aug 2023 07:51:48 +0900 Subject: [PATCH] embed.js target_origin more short code Co-authored-by: AHOHNMYC <24810600+AHOHNMYC@users.noreply.github.com> --- assets/js/embed.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/assets/js/embed.js b/assets/js/embed.js index 1b323194..d058e323 100644 --- a/assets/js/embed.js +++ b/assets/js/embed.js @@ -81,10 +81,7 @@ function return_message(message,target_window){ additional_info['value'] = {geterrorcode:player.error().code}; } message = Object.assign(additional_info,message); - let target_origin = url_params.get('origin'); - if(target_origin===null){ - target_origin = '*'; - } + let target_origin = url_params.get('origin') || '*'; target_window.postMessage(message,target_origin); }