Skip to content

Commit

Permalink
[iOS] - Get rid of Window Render Script (#26992)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon-T authored Dec 12, 2024
1 parent c9a9edd commit bcf0fbd
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 119 deletions.
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.

0 comments on commit bcf0fbd

Please sign in to comment.