[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-149.0a1-16.0-2] fixup! [android] Modify add-on support



Title: GitLab

clairehurst pushed to branch tor-browser-149.0a1-16.0-2 at The Tor Project / Applications / Tor Browser

Commits:

  • 89ec9e9a
    by clairehurst at 2026-04-08T11:05:44-06:00
    fixup! [android] Modify add-on support
    
    TB 44827: Always enable noscript for android
    

2 changed files:

Changes:

  • mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
    ... ... @@ -133,6 +133,9 @@ import java.util.concurrent.TimeUnit
    133 133
     import kotlin.math.roundToLong
    
    134 134
     import mozilla.components.support.AppServicesInitializer.Config as AppServicesConfig
    
    135 135
     
    
    136
    +import org.mozilla.fenix.components.TorBrowserFeatures.NOSCRIPT_ID
    
    137
    +
    
    138
    +
    
    136 139
     private const val RAM_THRESHOLD_MEGABYTES = 1024
    
    137 140
     private const val BYTES_TO_MEGABYTES_CONVERSION = 1024.0 * 1024.0
    
    138 141
     
    
    ... ... @@ -838,6 +841,15 @@ open class FenixApplication : Application(), Provider, ThemeProvider {
    838 841
                         components.useCases.tabsUseCases.selectTab(sessionId)
    
    839 842
                     },
    
    840 843
                     onExtensionsLoaded = { extensions ->
    
    844
    +                    // enable noscript if it is disabled
    
    845
    +                    extensions.find { extension : WebExtension ->
    
    846
    +                        extension.id == NOSCRIPT_ID
    
    847
    +                    }?.let { noScript ->
    
    848
    +                        if (!noScript.isEnabled()) {
    
    849
    +                            components.core.engine.enableWebExtension(noScript)
    
    850
    +                        }
    
    851
    +                    }
    
    852
    +
    
    841 853
                         // Delay until bootstrap is finished so that it will actually update tor-browser#44303
    
    842 854
                         components.torController.registerRunOnceBootstrapped(object : RunOnceBootstrapped {
    
    843 855
                             override fun onBootstrapped() {
    

  • mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/TorBrowserFeatures.kt
    ... ... @@ -24,7 +24,7 @@ import org.mozilla.fenix.tor.RunOnceBootstrapped
    24 24
     
    
    25 25
     object TorBrowserFeatures {
    
    26 26
         private val logger = Logger("torbrowser-features")
    
    27
    -    private const val NOSCRIPT_ID = "{73a6fe31-595d-460b-a920-fcc0f8843232}"
    
    27
    +    const val NOSCRIPT_ID = "{73a6fe31-595d-460b-a920-fcc0f8843232}"
    
    28 28
     
    
    29 29
         private fun installNoScript(
    
    30 30
             context: Context,
    

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx