X-Git-Url: https://git.danieliu.xyz/?p=surf.git;a=blobdiff_plain;f=surf.c;h=4520daa044a35c8b4f7458736ebef03cb0df4946;hp=5ff13f045d60ae1f6b9f5490e55e10e4e28e9e80;hb=b1e5693d5b520552c2f683f5b4585a83fb2d4c81;hpb=00d2c3398638ff386f3629a502317a7496b6e101 diff --git a/surf.c b/surf.c index 5ff13f0..4520daa 100644 --- a/surf.c +++ b/surf.c @@ -238,6 +238,7 @@ static void togglefullscreen(Client *c, const Arg *a); static void togglecookiepolicy(Client *c, const Arg *a); static void toggleinspector(Client *c, const Arg *a); static void find(Client *c, const Arg *a); +static void playexternal(Client *c, const Arg *a); /* Buttons */ static void clicknavigate(Client *c, const Arg *a, WebKitHitTestResult *h); @@ -1994,6 +1995,15 @@ clickexternplayer(Client *c, const Arg *a, WebKitHitTestResult *h) spawn(c, &arg); } +void +playexternal(Client *c, const Arg *a) +{ + Arg arg; + + arg = (Arg)VIDEOPLAY(geturi(c)); + spawn(c, &arg); +} + int main(int argc, char *argv[]) { @@ -2134,7 +2144,11 @@ main(int argc, char *argv[]) if (argc > 0) arg.v = argv[0]; else +#ifdef HOMEPAGE + arg.v = HOMEPAGE; +#else arg.v = "about:blank"; +#endif setup(); c = newclient(NULL);