From 7503bf0dae10af38cf8afd3238be4c44e0df2cf0 Mon Sep 17 00:00:00 2001 From: James Feng Cao Date: Thu, 24 Sep 2020 09:59:25 +0800 Subject: [PATCH] rebuilding site Thu Sep 24 09:59:25 AM CST 2020 --- searchurl/txt/videoplay.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/searchurl/txt/videoplay.js b/searchurl/txt/videoplay.js index 71f3b701..f1fe7983 100644 --- a/searchurl/txt/videoplay.js +++ b/searchurl/txt/videoplay.js @@ -38,16 +38,18 @@ function is_same_size_position(ele1, ele2) { } } -function find_top_wrap_ele(ele) { + function find_top_wrap_ele(ele) { + let origE = ele; let wrap = ele; while (ele.tagName !== 'BODY') { - ele = ele.parentElement; - if (is_same_size_position(wrap, ele)) { - wrap = ele; - } + ele = ele.parentElement; + if (is_same_size_position(wrap, ele)) { + wrap = ele; + } } + if(wrap == origE) wrap = origE.parentElement; return wrap; -} + } function is_parent(ele, parent) { while (ele.tagName !== 'BODY' &&