diff --git a/.gitmodules b/.gitmodules index 64cf5d4f8e..ed758689cf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "submodules/ios-js-support"] - path = submodules/ios-js-support - url = https://github.com/duckduckgo/ios-js-support.git [submodule "submodules/privacy-reference-tests"] path = submodules/privacy-reference-tests url = https://github.com/duckduckgo/privacy-reference-tests diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index dcfff2e230..e538897376 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -364,7 +364,6 @@ 85F21DC621145DD5002631A6 /* global.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8512BCBF2061B6110085E862 /* global.swift */; }; 85F2FFCD2211F615006BB258 /* MainViewController+KeyCommands.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85F2FFCC2211F615006BB258 /* MainViewController+KeyCommands.swift */; }; 85F2FFCF2211F8E5006BB258 /* TabSwitcherViewController+KeyCommands.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85F2FFCE2211F8E5006BB258 /* TabSwitcherViewController+KeyCommands.swift */; }; - 85F2FFFD2215C020006BB258 /* findinpage.js in Resources */ = {isa = PBXBuildFile; fileRef = 85F2FFFC2215C020006BB258 /* findinpage.js */; }; 85F98F92296F32BD00742F4A /* SyncSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85F98F91296F32BD00742F4A /* SyncSettingsViewController.swift */; }; 85F98F98296F4CB100742F4A /* SyncAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 85F98F97296F4CB100742F4A /* SyncAssets.xcassets */; }; 8C4724502217A14B004C9B2D /* TabViewControllerLongPressBookmarkExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C47244F2217A14B004C9B2D /* TabViewControllerLongPressBookmarkExtension.swift */; }; @@ -692,6 +691,7 @@ F44D279C27F331BB0037F371 /* AutofillLoginPromptView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44D279727F331BB0037F371 /* AutofillLoginPromptView.swift */; }; F44D279E27F331BB0037F371 /* AutofillLoginPromptViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44D279927F331BB0037F371 /* AutofillLoginPromptViewModel.swift */; }; F44D279F27F331BB0037F371 /* AutofillLoginPromptViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44D279A27F331BB0037F371 /* AutofillLoginPromptViewController.swift */; }; + F45681FA298DA4B8003DC976 /* FindInPageIOSJSSupport in Frameworks */ = {isa = PBXBuildFile; productRef = F45681F9298DA4B8003DC976 /* FindInPageIOSJSSupport */; }; F456B3B525810BB900B79B90 /* FireButtonAnimationSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F456B3B425810BB900B79B90 /* FireButtonAnimationSettingsViewController.swift */; }; F46FEC5727987A5F0061D9DF /* KeychainItemsDebugViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F46FEC5627987A5F0061D9DF /* KeychainItemsDebugViewController.swift */; }; F47E53D9250A97330037C686 /* OnboardingDefaultBroswerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F47E53D8250A97330037C686 /* OnboardingDefaultBroswerViewController.swift */; }; @@ -707,6 +707,7 @@ F4C9FBF528340DDA002281CC /* AutofillInterfaceEmailTruncator.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4C9FBF428340DDA002281CC /* AutofillInterfaceEmailTruncator.swift */; }; F4CE6D1B257EA33C00D0A6AA /* FireButtonAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4CE6D1A257EA33C00D0A6AA /* FireButtonAnimator.swift */; }; F4D7221026F29A70007D6193 /* BookmarkDetailsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4D7220F26F29A70007D6193 /* BookmarkDetailsCell.swift */; }; + F4D7F634298C00C3006C3AE9 /* FindInPageIOSJSSupport in Frameworks */ = {isa = PBXBuildFile; productRef = F4D7F633298C00C3006C3AE9 /* FindInPageIOSJSSupport */; }; F4D9C4FA25117A0F00814B71 /* HomeMessageStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4D9C4F925117A0F00814B71 /* HomeMessageStorage.swift */; }; F4E1936625AF722F001D2666 /* HighlightCutOutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E1936525AF722F001D2666 /* HighlightCutOutView.swift */; }; F4F6DFB226E6AEC100ED7E12 /* AddOrEditBookmarkViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4F6DFB126E6AEC100ED7E12 /* AddOrEditBookmarkViewController.swift */; }; @@ -2170,6 +2171,7 @@ 31E69A63280F4CB600478327 /* DuckUI in Frameworks */, 85875B6129912A9900115F05 /* SyncUI in Frameworks */, 4B5167422824B492004C67BA /* Lottie in Frameworks */, + F4D7F634298C00C3006C3AE9 /* FindInPageIOSJSSupport in Frameworks */, 85D598872927F84C00FA3B1B /* Crashes in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -2232,6 +2234,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + F45681FA298DA4B8003DC976 /* FindInPageIOSJSSupport in Frameworks */, 98A50962294B48A400D10880 /* Bookmarks in Frameworks */, 1E60989B290009C700A508F9 /* Common in Frameworks */, 1E60989D290011E600A508F9 /* ContentBlocking in Frameworks */, @@ -4462,6 +4465,7 @@ 31E69A62280F4CB600478327 /* DuckUI */, 4B5167412824B492004C67BA /* Lottie */, 85D598862927F84C00FA3B1B /* Crashes */, + F4D7F633298C00C3006C3AE9 /* FindInPageIOSJSSupport */, 85875B6029912A9900115F05 /* SyncUI */, 3760DFEC299315EF0045A446 /* Waitlist */, ); @@ -4628,6 +4632,7 @@ 1E60989E290011E600A508F9 /* PrivacyDashboard */, 1E6098A0290011E600A508F9 /* UserScript */, 98A50961294B48A400D10880 /* Bookmarks */, + F45681F9298DA4B8003DC976 /* FindInPageIOSJSSupport */, CBC83E3329B631780008E19C /* Configuration */, ); productName = Core; @@ -4746,6 +4751,7 @@ C14882EB27F211A000D59F0C /* XCRemoteSwiftPackageReference "SwiftSoup" */, 4B5167402824B492004C67BA /* XCRemoteSwiftPackageReference "lottie-ios" */, 98A16C2928A11BDE00A6C003 /* XCRemoteSwiftPackageReference "BrowserServicesKit" */, + F4D7F632298C00C3006C3AE9 /* XCRemoteSwiftPackageReference "ios-js-support" */, ); productRefGroup = 84E341931E2F7EFB00BDBA6F /* Products */; projectDirPath = ""; @@ -4975,7 +4981,6 @@ 98B001B0251EABB40090EC07 /* InfoPlist.strings in Resources */, 02BA15B126A89ECA00472DD7 /* ios-config.json in Resources */, 4B52648B25F9613B00CB4C24 /* trackerData.json in Resources */, - 85F2FFFD2215C020006BB258 /* findinpage.js in Resources */, 850559C923C61B5D0055C0D5 /* login-form-detection.js in Resources */, 83E2D2B3253CC16B005605F5 /* httpsMobileV2FalsePositives.json in Resources */, 4B60AC97252EC07B00E8D219 /* fullscreenvideo.js in Resources */, @@ -7436,6 +7441,14 @@ version = 1.5.0; }; }; + F4D7F632298C00C3006C3AE9 /* XCRemoteSwiftPackageReference "ios-js-support" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/duckduckgo/ios-js-support"; + requirement = { + kind = exactVersion; + version = 2.0.0; + }; + }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ @@ -7511,6 +7524,11 @@ package = C14882EB27F211A000D59F0C /* XCRemoteSwiftPackageReference "SwiftSoup" */; productName = SwiftSoup; }; + F45681F9298DA4B8003DC976 /* FindInPageIOSJSSupport */ = { + isa = XCSwiftPackageProductDependency; + package = F4D7F632298C00C3006C3AE9 /* XCRemoteSwiftPackageReference "ios-js-support" */; + productName = FindInPageIOSJSSupport; + }; CBC83E3329B631780008E19C /* Configuration */ = { isa = XCSwiftPackageProductDependency; package = 98A16C2928A11BDE00A6C003 /* XCRemoteSwiftPackageReference "BrowserServicesKit" */; @@ -7536,6 +7554,11 @@ package = F486D2FD25069744002D07D7 /* XCRemoteSwiftPackageReference "OHHTTPStubs" */; productName = OHHTTPStubsSwift; }; + F4D7F633298C00C3006C3AE9 /* FindInPageIOSJSSupport */ = { + isa = XCSwiftPackageProductDependency; + package = F4D7F632298C00C3006C3AE9 /* XCRemoteSwiftPackageReference "ios-js-support" */; + productName = FindInPageIOSJSSupport; + }; /* End XCSwiftPackageProductDependency section */ /* Begin XCVersionGroup section */ diff --git a/DuckDuckGo/FindInPageUserScript.swift b/DuckDuckGo/FindInPageUserScript.swift index 5f91540c81..c2327b6146 100644 --- a/DuckDuckGo/FindInPageUserScript.swift +++ b/DuckDuckGo/FindInPageUserScript.swift @@ -20,11 +20,12 @@ import Core import WebKit import UserScript +import FindInPageIOSJSSupport public class FindInPageUserScript: NSObject, UserScript { public lazy var source: String = { - return Self.loadJS("findinpage", from: Bundle.core) + return Self.loadJS("findinpage", from: FindInPageIOSJSSupport.bundle) }() public var injectionTime: WKUserScriptInjectionTime = .atDocumentStart diff --git a/submodules/ios-js-support b/submodules/ios-js-support deleted file mode 160000 index f13a1405ae..0000000000 --- a/submodules/ios-js-support +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f13a1405aef2b7f61e421dc8d10f601dd19370b4