X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=surf.c;h=30464d5a6cb740741a776cabea6bebb93d90aade;hb=d0020bad4fc40f3a84e828936c2588232bb687bf;hp=f5c7d1e9d7b5d25772244661deacc78578bfc73e;hpb=c3a827d621fbedfb974db9d137d3e5bea66490b4;p=surf.git diff --git a/surf.c b/surf.c index f5c7d1e..30464d5 100644 --- a/surf.c +++ b/surf.c @@ -1368,7 +1368,12 @@ void togglestyle(Client *c, const Arg *a) { 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); }