File: hide_scrollbars.lua

package info (click to toggle)
luakit 1%3A2.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,844 kB
  • sloc: ansic: 12,519; makefile: 140; ruby: 79; sh: 48
file content (25 lines) | stat: -rw-r--r-- 531 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- Hide scrollbars.
--
-- Hides all element scrollbars. Elements can still be scrolled as usual.
--
-- @module hide_scrollbars
-- @copyright 2016 Aidan Holm <aidanholm@gmail.com>

local webview = require("webview")

local _M = {}

local disable_scrollbar_ss = stylesheet{ source = [===[
    ::-webkit-scrollbar {
        width: 0 !important;
        height: 0 !important;
    }
]===] }

webview.add_signal("init", function (view)
    view.stylesheets[disable_scrollbar_ss] = true
end)

return _M

-- vim: et:sw=4:ts=8:sts=4:tw=80