From a9161fea323fcd62040288fbaa0e02783396bb66 Mon Sep 17 00:00:00 2001 From: Hulk Date: Sat, 9 Apr 2022 22:19:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DiOS=E4=BE=A7H5?= =?UTF-8?q?=E6=B3=A8=E5=85=A5=E8=84=9A=E6=9C=AC=E4=B8=AD=E8=AF=AD=E6=B3=95?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=AF=BC=E8=87=B4=E7=9A=84=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PrismBehaviorRecordManager+PrismDispatchListenerProtocol.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iOS/DiDiPrism/Src/Ability/BehaviorRecord/Manager/PrismBehaviorRecordManager+PrismDispatchListenerProtocol.m b/iOS/DiDiPrism/Src/Ability/BehaviorRecord/Manager/PrismBehaviorRecordManager+PrismDispatchListenerProtocol.m index 5a13890..0750896 100644 --- a/iOS/DiDiPrism/Src/Ability/BehaviorRecord/Manager/PrismBehaviorRecordManager+PrismDispatchListenerProtocol.m +++ b/iOS/DiDiPrism/Src/Ability/BehaviorRecord/Manager/PrismBehaviorRecordManager+PrismDispatchListenerProtocol.m @@ -121,7 +121,7 @@ - (void)dispatchEvent:(PrismDispatchEvent)event withSender:(NSObject *)sender pa else if (event == PrismDispatchEventWKWebViewInitWithFrame) { WKWebView *webView = (WKWebView*)sender; WKWebViewConfiguration *configuration = [params objectForKey:@"configuration"]; - NSString *recordScript = @"!function(){\"use strict\";var e=new(function(){function e(){}return e.prototype.record=function(e){for(var t=this.getContent(e),n=[];e&&\"body\"!==e.nodeName.toLowerCase();){var i=e.nodeName.toLowerCase();if(e.id)i+=\"#\"+e.id;else{for(var r=e.className.split(\" \").filter((function(e,t,n){e.trim()})).join(\".\"),o=!(null===r||\"\"===r),s=e,c=1;s.previousElementSibling;)s=s.previousElementSibling,o&&s.className.split(\" \").filter((function(e,t,n){e.trim()})).join(\".\")===r&&(o=!1),c+=1;if(o)for(s=e;s.nextElementSibling;)if(s=s.nextElementSibling,o&&s.className.split(\" \").filter((function(e,t,n){e.trim()})).join(\".\")===r){o=!1;break}o?i+=\".\"+r:c>1&&(i+=\":nth-child(\"+c+\")\")}n.unshift(i),e=e.parentElement}return n.unshift(\"body\"),{instruct:n.join(\">\"),content:t}},e.prototype.getContent=function(e){return e.innerText?this.getText(e):e.getAttribute(\"src\")?e.getAttribute(\"src\"):e.querySelectorAll(\"img\")&&e.querySelectorAll(\"img\").length>0?this.getImgSrc(e):\"\"},e.prototype.getText=function(e){if(!(e.childNodes&&e.childNodes.length>0))return e.innerText||e.nodeValue;for(var t=0;t1&&(r+=\":nth-child(\"+c+\")\")}n.unshift(r),e=e.parentElement}return n.unshift(\"body\"),{instruct:n.join(\">\"),content:t}},e.prototype.getContent=function(e){return e.innerText?this.getText(e):e.getAttribute(\"src\")?e.getAttribute(\"src\"):e.querySelectorAll(\"img\")&&e.querySelectorAll(\"img\").length>0?this.getImgSrc(e):\"\"},e.prototype.getText=function(e){if(!(e.childNodes&&e.childNodes.length>0))return e.innerText||e.nodeValue;for(var t=0;t