sophie-glk / bang

A firefox addon which adds bangs (known from duckduckgo) to various search engines.
MIT License
47 stars 5 forks source link

Bang search fails on multi-character bangs on mobile #27

Closed domportera closed 1 year ago

domportera commented 1 year ago

Tested with Firefox Mobile. I'm not sure if this is something you can address, but the regex for detecting a bang on Firefox Mobile (Android) seems to be limited to recognizing single-character bangs

After mistakenly opening an issue on this repo when i meant to do so on this one, I discovered they both are suffering from this problem. It could be a firefox issue, or it could be a difference in how regex is processed on mobile? 🤷‍♂️

sophie-glk commented 1 year ago

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/update

Apparently the firefox android version doesn't support loadReplace in the tab.update method. I added an exception for android, so that this option isn't used. This should fix your issue. Maybe you could try it out first, before i publish an updated version.

https://extensionworkshop.com/documentation/develop/developing-extensions-for-firefox-for-android/#debug-your-extension

domportera commented 1 year ago

amazing! I'll see if i can give it a shot when i get home tonight

domportera commented 1 year ago

it works!! thank u so much