Luakit Documentation   /   Modules   /   domain_props

Module domain_props

Automatically apply per-domain webview properties

This module allows you to have site-specific settings. For example, you can choose to enable WebGL only on certain specific sites, or enable JavaScript only on a sub-domain of a website without enabling JavaScript for the root domain.

Example domain_props rules

globals.domain_props = {
    ["all"] = {
        enable_scripts = false,
        enable_plugins = false,
    },
    ["youtube.com"] = {
        enable_scripts = true,
    },
    ["m.youtube.com"] = {
        enable_scripts = false,
    },
}

Explanation

There are three rules in the example. From top to bottom, they are least-specific to most-specific:

Rule application

The order that rules are specified in the file does not matter, although in the default the "all" rule is listed first. All properties in any matching rules are applied, but the value that is used is the one specified in the most specific rule. If a property is not applied in any rule, it is not changed.

Available properties

Attribution

Copyright