mirror of git://git.suckless.org/surf
Adapt togglestyle()
We can't apply an empty stylesheet anymore, instead remove any previous stylesheet.
This commit is contained in:
parent
c3a827d621
commit
d0020bad4f
7
surf.c
7
surf.c
|
@ -1368,7 +1368,12 @@ void
|
||||||
togglestyle(Client *c, const Arg *a)
|
togglestyle(Client *c, const Arg *a)
|
||||||
{
|
{
|
||||||
enablestyle = !enablestyle;
|
enablestyle = !enablestyle;
|
||||||
setstyle(c, enablestyle ? getstyle(geturi(c)) : "");
|
|
||||||
|
if (enablestyle)
|
||||||
|
setstyle(c, getstyle(geturi(c)));
|
||||||
|
else
|
||||||
|
webkit_user_content_manager_remove_all_style_sheets(
|
||||||
|
webkit_web_view_get_user_content_manager(c->view));
|
||||||
|
|
||||||
updatetitle(c);
|
updatetitle(c);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue