diff options
-rw-r--r-- | .config/luakit/globals.lua | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/.config/luakit/globals.lua b/.config/luakit/globals.lua index 9cce2ce..264606e 100644 --- a/.config/luakit/globals.lua +++ b/.config/luakit/globals.lua @@ -1,7 +1,6 @@ -- Global variables for luakit globals = { homepage = "http://google.de/", - -- homepage = "http://github.com/mason-larobina/luakit", scroll_step = 30, zoom_step = 0.1, max_cmd_history = 100, @@ -16,11 +15,12 @@ globals = { } -- Make useragent -local arch = string.match(({luakit.spawn_sync("uname -sm")})[2], "([^\n]*)") -local lkv = string.format("luakit/%s", luakit.version) -local wkv = string.format("WebKitGTK+/%d.%d.%d", luakit.webkit_major_version, luakit.webkit_minor_version, luakit.webkit_micro_version) -local awkv = string.format("AppleWebKit/%s.%s+", luakit.webkit_user_agent_major_version, luakit.webkit_user_agent_minor_version) -globals.useragent = string.format("Mozilla/5.0 (%s) %s %s %s", arch, awkv, wkv, lkv) +local _, arch = luakit.spawn_sync("uname -sm") +-- Only use the luakit version if in date format (reduces identifiability) +local lkv = string.match(luakit.version, "^(%d+.%d+.%d+)") +globals.useragent = string.format("Mozilla/5.0 (%s) AppleWebKit/%s+ (KHTML, like Gecko) WebKitGTK+/%s luakit%s", + string.sub(arch, 1, -2), luakit.webkit_user_agent_version, + luakit.webkit_version, (lkv and ("/" .. lkv)) or "") -- Search common locations for a ca file which is used for ssl connection validation. local ca_files = { @@ -32,17 +32,17 @@ local ca_files = { -- Use the first ca-file found for _, ca_file in ipairs(ca_files) do if os.exists(ca_file) then - soup.set_property("ssl-ca-file", ca_file) + soup.ssl_ca_file = ca_file break end end -- Change to stop navigation sites with invalid or expired ssl certificates -soup.set_property("ssl-strict", false) +soup.ssl_strict = false -- Set cookie acceptance policy cookie_policy = { always = 0, never = 1, no_third_party = 2 } -soup.set_property("accept-policy", cookie_policy.always) +soup.accept_policy = cookie_policy.always -- List of search engines. Each item must contain a single %s which is -- replaced by URI encoded search terms. All other occurances of the percent @@ -68,18 +68,18 @@ search_engines.default = search_engines.google -- See http://webkitgtk.org/reference/webkitgtk-WebKitWebSettings.html domain_props = { --[[ ["all"] = { - ["enable-scripts"] = false, - ["enable-plugins"] = false, - ["enable-private-browsing"] = false, - ["user-stylesheet-uri"] = "", + enable_scripts = false, + enable_plugins = false, + enable_private_browsing = false, + user_stylesheet_uri = "", }, ["youtube.com"] = { - ["enable-scripts"] = true, - ["enable-plugins"] = true, + enable_scripts = true, + enable_plugins = true, }, ["bbs.archlinux.org"] = { - ["user-stylesheet-uri"] = "file://" .. luakit.data_dir .. "/styles/dark.css", - ["enable-private-browsing"] = true, + user_stylesheet_uri = "file://" .. luakit.data_dir .. "/styles/dark.css", + enable_private_browsing = true, }, ]] } |