Commit Graph

11 Commits (d17225bd2f9192492c47638b33a73675ad4bb491)

Author SHA1 Message Date
Antoine Beaupré d16e34c736 append javascript after CSS
Javascript resources should be presented to browsers after CSS, and
"after the fold" (ATF) according to the best practices:

https://developers.google.com/speed/docs/insights/mobile#PutStylesBeforeScripts

This change allows the browser to download Javascript files in
parallel, by including Javascript on the *closing* </body> tag instead
of the opening tag.

We also improve the regex to tolerate spaces before the body tag, as
some templates have (proper) indentation for the tag.
2019-02-03 17:01:55 +00:00
Antoine Beaupré c42f992dc9 include manually the toggle js code 2012-07-19 10:32:02 -04:00
Joey Hess bfda13f16c recentchangesdiff: truncate extremely large diffs
A diff was already truncated after 200 lines. But it could still be
arbitrarily enormous, if a spammer or other random noise source likes long
lines. That could use a lot of memory to html encode etc the diff and fill
it into the template. Truncating after 100kb seems sufficient; it allows
for 200 lines of up to 512 characters each.
2012-01-23 18:39:53 -04:00
Joey Hess 4fb26f4e60 Add a second parameter to the rcs_diff hook, and avoid bloating memory reading in enormous commits. 2010-12-29 19:58:49 -04:00
Joey Hess 678d467a40 finalise version 3.00 of the plugin api 2008-12-23 16:34:19 -05:00
Joey Hess bb93fccf06 Coding style change: Remove explcit vim folding markers. 2008-12-17 15:22:16 -05:00
Joey Hess e307eeda3d html escaping complication
Can't escape things to entities if the template then escapes the entities.
(aggregate doesn't have this problem.)
2008-11-18 02:48:24 -05:00
Joey Hess 15269fed64 improve escaping of wikilinks and preprocessor directives
The old method failed for '[' x 3.
2008-11-18 02:43:17 -05:00
Joey Hess 39195de96e add plugin safe/rebuild info (part 2 of 3)
(brain.. melting..)
2008-08-03 17:20:21 -04:00
Joey Hess 862ca19eb1 truncate recentchangesdiffs after 200 lines
This works around a perl crasher bug, and also avoids bloating pages
with enormous diffs.

rcs_recentchanges modified to return a list in an array context.
2008-03-12 15:45:10 -04:00
Joey Hess d93aaed791 * Add recentchangesdiff plugin that adds diffs to the recentchanges feeds.
* rcs_diff is a new function that rcs modules should implement.
* Implemented rcs_diff for git, svn, and tla (tla version untested).
  Mercurial and monotone still todo.
2008-03-03 15:53:34 -05:00