diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-12-01 14:47:34 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-12-01 14:47:34 +0200 |
commit | b18b380014222131572a186888e6aa035c9c06e1 (patch) | |
tree | d21e066681c67b094ddfa0c67e03b77c39f1780b /src/app.c | |
parent | d87edbfc4907b0985b107e1432f73104eb66d356 (diff) |
Subscribing to new headings on a page
When "subscribed" and "headings" tags are used, the subscribed page is tracked for newly added headings (of any kind).
This works for the weiph/pikkulogs out there.
Diffstat (limited to 'src/app.c')
-rw-r--r-- | src/app.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1090,6 +1090,12 @@ iBool handleCommand_App(const char *cmd) { | |||
1090 | if (gotoHeading.start) { | 1090 | if (gotoHeading.start) { |
1091 | postCommandf_App("document.goto heading:%s", cstr_Rangecc(gotoHeading)); | 1091 | postCommandf_App("document.goto heading:%s", cstr_Rangecc(gotoHeading)); |
1092 | } | 1092 | } |
1093 | const iRangecc gotoUrlHeading = range_Command(cmd, "gotourlheading"); | ||
1094 | if (gotoUrlHeading.start) { | ||
1095 | postCommandf_App("document.goto heading:%s", | ||
1096 | cstrCollect_String(urlDecode_String( | ||
1097 | collect_String(newRange_String(gotoUrlHeading))))); | ||
1098 | } | ||
1093 | } | 1099 | } |
1094 | else if (equal_Command(cmd, "document.request.cancelled")) { | 1100 | else if (equal_Command(cmd, "document.request.cancelled")) { |
1095 | /* TODO: How should cancelled requests be treated in the history? */ | 1101 | /* TODO: How should cancelled requests be treated in the history? */ |