Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] - Get rid of Window Render Script #26992

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions ios/brave-ios/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,6 @@ var braveTarget: PackageDescription.Target = .target(
.copy(
"Frontend/UserContent/UserScripts/Scripts_Dynamic/Scripts/Sandboxed/SiteStateListenerScript.js"
),
.copy(
"Frontend/UserContent/UserScripts/Scripts_Dynamic/Scripts/Sandboxed/WindowRenderScript.js"
),
.copy("WebFilters/ContentBlocker/Lists/block-ads.json"),
.copy("WebFilters/ContentBlocker/Lists/block-cookies.json"),
.copy("WebFilters/ContentBlocker/Lists/block-trackers.json"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,6 @@ public class BrowserViewController: UIViewController {
#if canImport(BraveTalk)
self.braveTalkJitsiCoordinator.resetPictureInPictureBounds(.init(size: size))
#endif
},
completion: { _ in
if let tab = self.tabManager.selectedTab {
WindowRenderScriptHandler.executeScript(for: tab)
}
}
)
}
Expand Down Expand Up @@ -736,11 +731,6 @@ public class BrowserViewController: UIViewController {
self.bottomBarKeyboardBackground.backgroundColor = self.topToolbar.backgroundColor
self.setNeedsStatusBarAppearanceUpdate()
}
},
completion: { _ in
if let tab = self.tabManager.selectedTab {
WindowRenderScriptHandler.executeScript(for: tab)
}
}
)
}
Expand Down Expand Up @@ -2624,7 +2614,6 @@ extension BrowserViewController: TabDelegate {
BraveSearchScriptHandler(tab: tab, profile: profile, rewards: rewards),
ResourceDownloadScriptHandler(tab: tab),
DownloadContentScriptHandler(browserController: self, tab: tab),
WindowRenderScriptHandler(tab: tab),
PlaylistScriptHandler(tab: tab),
PlaylistFolderSharingScriptHandler(tab: tab),
RewardsReportingScriptHandler(rewards: rewards, tab: tab),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,6 @@ extension Preferences {
default: true
)

public static let windowRender =
Option<Bool>(
key: "userscript.preferences.\(UserScriptManager.ScriptType.windowRenderHelper.rawValue)",
default: true
)

public static let readyState =
Option<Bool>(
key: "userscript.preferences.\(UserScriptManager.ScriptType.readyStateHelper.rawValue)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ struct UserScriptsDebugView: View {
@ObservedObject
private var trackingProtectionStats = Preferences.UserScript.trackingProtectionStats

@ObservedObject
private var windowRender = Preferences.UserScript.windowRender

@ObservedObject
private var readyState = Preferences.UserScript.readyState

Expand Down Expand Up @@ -83,8 +80,6 @@ struct UserScriptsDebugView: View {

Toggle("Tracking Protection Stats", isOn: $trackingProtectionStats.value)

Toggle("Window Render Helper", isOn: $windowRender.value)

Toggle("Ready State", isOn: $readyState.value)

Toggle("Ethereum Provider", isOn: $ethereumProvider.value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ class UserScriptManager {
scripts.append(.playlist)
}

if Preferences.UserScript.windowRender.value {
scripts.append(.windowRenderHelper)
}

if Preferences.UserScript.readyState.value {
scripts.append(.readyStateHelper)
}
Expand Down Expand Up @@ -126,7 +122,6 @@ class UserScriptManager {
case requestBlocking
case trackerProtectionStats
case resourceDownloader
case windowRenderHelper
case readyStateHelper
case ethereumProvider
case solanaProvider
Expand Down Expand Up @@ -170,9 +165,6 @@ class UserScriptManager {
case .playlist:
return Preferences.UserScript.playlist.value ? PlaylistScriptHandler.userScript : nil
case .resourceDownloader: return ResourceDownloadScriptHandler.userScript
case .windowRenderHelper:
return Preferences.UserScript.windowRender.value
? WindowRenderScriptHandler.userScript : nil
case .readyStateHelper:
return Preferences.UserScript.readyState.value ? ReadyStateScriptHandler.userScript : nil
case .youtubeQuality:
Expand Down

This file was deleted.

This file was deleted.

Loading