How To Use Focus From Your URL Bar
Mojeek Focus allows you to create lists of sites to be included and/or excluded when searching, making it a very useful tool when it comes to tailoring Mojeek to your particular needs. This post, inspired by a comment from a long-term user of Focus, will outline a method you can use in order to trigger Focus engines from the URL bar – even those which aren’t in the Templates Library.
Select Your Focus
The first thing that you might want to do, in preparation for adding an extra search option to your browser, is set up the Focus that you’d like to be able to use quickly. If you’re just interested in the method and are happy to do this process later, you can go through the rest of the instructions on the page with one of the prebuilt engines from the Template Library.
For a complete guide on building a Focus, steps 1-3 of our How To Submit Your Focus piece are very helpful. If you feel at the end of that process you’ve created something which could be useful to others, please feel free to follow the steps after that to submit it to the Repository.
Focus Parameter
This method uses the fact that Focus searches have a foc or foc_t parameter in them, with the former being used by ones you create yourself, and the latter being the parameter for Templates which are in the Library. Let’s have a look at the URL which is used for a Focus search in order to understand how it can be used quickly within the browser URL bar. Note here that if you’re using Cookieless this will look quite different; for this piece we will use a clean setup to avoid confusion, but this method will work even if you’ve set your Preferences without a cookie:
https://www.mojeek.com/search?q=casserole&foc_t=Recipes
Here is a search for “casserole” using the Recipes Focus. We are going to preserve everything in this URL aside from the query, which needs to be replaced with %s so that browsers know where to insert your search term when using it to search the web. Our resulting URL is:
https://www.mojeek.com/search?q=%s&foc_t=Recipes
With this browser-ready URL we can now look at the method. Here I have separated the two main browser types, with Chromium-based browsers (Brave, Chrome, Edge, Vivaldi etc.) coming first, and Gecko-based browsers (Firefox, Mullvad, Waterfox, Librewolf) coming second. Please skip to the relevant part based upon which navigator you use.
Using This in Chrome
The process for adding our Focus URL as a search engine in Chrome (and most browsers using the same engine) is the same as Adding Mojeek to Chrome but instead using the URL which contains both %s and &foc or &foc_t. A very simple way of triggering a search with this Focus, instead of searching across the whole of Mojeek, is by using keywords - so make sure that you using something short and memorable. Here is the Recipes Focus being added with “mr”.
After you’ve added this using the Add Engine button, you will be able to use “mr” and then a space to trigger Recipes.
Using This in Firefox
The process for adding our Focus URL as a search engine in Firefox starts with inputting about:preferences#search into the URL bar and scrolling down until you see the Search Shortcuts box. You then click Add and use your URL from before, which contains both %s and &foc or &foc_t. If you don't see an Add button then open a new tab and type in the address bar about:config. In the search box presented to you, type browser.urlbar.update2.engineAliasRefresh and click on the little + symbol on the right of this option. You will now have brought back the Add button, and can return to about:preferences#search.
A very simple way of triggering a search with this Focus, instead of searching across the whole of Mojeek, is using keywords (here called an Alias) - so make sure that you using something short and memorable. Here is the Recipes Focus being added with “mr”.
After you’ve added this in using the Add Engine button you will be able to use “mr” and then a space to trigger Recipes. You can also input your search query and then click the correct search icon under the URL bar, but note here that these Focus adds will all have the same magnifying-glass icon - so could be hard to sift through.
Get In Touch
Hopefully this gives you a new and novel way to use Focus, allowing you to get to categorised searches that little bit quicker. If you’ve enjoyed this method, have a way in which it could be better, or have any other suggestions for Mojeek shortcuts, please don’t hesitate to get in touch. You can read more tips on how to make Mojeek work better for you in our no-tracking Newsletter.