# SHORTY'S LUAKIT GUIDE
> javascript on demand and adblocking
2023-05-18

The guide is written with OpenBSD in mind, but luakit is extradimensional
and will run on a variety of OS's. Let's skip the formalities and get into
it:

## JAVASCRIPT ON DEMAND
Copy the default config into ~/.config/luakit. You might have to mkdir 
the directory.

``
 $ cp /etc/xdg/luakit/rc.lua ~/.config/luakit/
``

Edit the config file. Ie.: vi ~/.config/luakit/rc.lua and find and uncomment
the following (remove --):

``
require "noscript"
``

And append like so:

``
require "noscript"
local noscript = require "noscript"
noscript.enable_scripts = false
``

This disables javascript by default on all domains. You can enable scripts
for the current domain by pressing ,ts in a sequence. Make sure to refresh
the page afterwards with SHIFT+R. This setting is persistent. Press ,ts
again to toggle the setting or press ,tr to disable it.

## ADBLOCKING
Adblock is enabled by default, but you need to provide it with your own 
lists. I'm using lists from easylist.to.

The easylist.to lists are mirrored on triapul's gopher. Read what each list
does on the aforementioned site.

 gopher://triapul.cz/1/files/easylist/

It is advisable to routinely update these lists, for example with a cronjob.
If you want to use the local gopher mirror, here are the full links. These
are refreshed daily.

``
gopher://triapul.cz/0/files/easylist/easylist.txt
gopher://triapul.cz/0/files/easylist/easyprivacy.txt
gopher://triapul.cz/0/files/easylist/fanboy-annoyance.txt
gopher://triapul.cz/0/files/easylist/fanboy-cookiemonster.txt
gopher://triapul.cz/0/files/easylist/fanboy-social.txt
``

Place the lists into ~/.local/share/luakit/adblock and restart luakit. Check
that the lists are loaded by typing :adblock.

### netcat fetcher
Here's a script that pulls all the lists from triapul by matto.

* gopher://triapul.cz/0/files/luakit-list-script.sh

## PROXIES
Type :proxy and press a to add a new proxy. The format is:

 custom_name add.r.e.ss

luakit is socks compatible. Ie:

 my_socks_proxy socks5://127.0.0.1:1337

You have to enable the proxy afterwards. Type :proxy and select it.

## CONCLUSION
Use luakit if you need to visit the bloat-web in it's purest form.
Otherwise just use links2.

## More
* gopher://texto-plano.xyz/0/~anthk/tuto/luakit.txt - luakit guide in Spanish

## References
* https://luakit.github.io
* https://easylist.to
* links2gang