There is a nice add-on you can try called KeyConfig available from here. Unfortunately the author hasn't added this to the official Mozilla Addons.
If you still want to try this "untrusted" add-on, click on the keyconfig.xpi and install it. Then go to your firefox addons to display various keybindings offered by the addon
Click on the box shown by the arrow and choose your key combination - CTRL + 1.
This will change the value in the box to CTRL+1. Click the Apply button
Repeat for the rest of the "key_selectTab" values.
A solution has been provided here which is a combination of sed
and python2
. Here is a little bit more clear version of it:
sed -n "$(
python2 <<< $'import json
f = open("/home/username/.mozilla/firefox/RANDOM.default/sessionstore-backups/recovery.js", "r")
jdata = json.loads(f.read())
f.close()
print str(jdata["windows"][0]["selected"])')p" <(python2 <<< $'import json
f = open("/home/username/.mozilla/firefox/RANDOM.default/sessionstore-backups/recovery.js", "r")
jdata = json.loads(f.read())
f.close()
for win in jdata.get("windows"):
for tab in win.get("tabs"):
i = tab.get("index") - 1
print tab.get("entries")[i].get("url")'
)
The file it's using is:
/home/username/.mozilla/firefox/RANDOM.profile/sessionstore.js
in more recent versions you should change it with:
/home/username/.mozilla/firefox/RANDOM.default/sessionstore-backups/recovery.js
Note that this file get regenerated every 15 second so after window being instantly changed it doesn't give you the correct URL, you have to wait some second.
How does this work?
At the first part it look for the id of active tab, it's something between 1 to count of open tabs. let's say it's "3", the code corresponding to this purpose is:
str(jdata["windows"][0]["selected"])
Next it returns a list of URLs (All open tabs) and feds it to the stdin
of sed
:
for win in jdata.get("windows"):
for tab in win.get("tabs"):
i = tab.get("index") - 1
print tab.get("entries")[i].get("url")
So we are doing something like:
sed -n 3p <<< "URL1
URL2
URL3"
which brings us to "URL3".
Best Answer
The option you are looking for is buried away in the Firefox configuration options.
In the search bar type
about:config
as shown and accept the warning subsequently shown.Search for
permissions.default
as shownRight click and choose Modify and change the value to either
2
to block all images or3
to block images coming from other sites not the site being loaded.source
... and here is an example of option 2 with google.co.uk i.e. no google logo