On 06/21/2018 03:03 PM, Christian Hesse wrote:
Andy Green <[email protected]> on Thu, 2018/06/21 13:42:
This adds a small css class and a function in ui-shared that
emits canned javascript to interpret the # part of the URL
on the client, and apply a highlight to filtered source.
" e1.style.backgroundColor =
\"yellow\";\n"
+ " }\n"
+ "\n"
+ " e.scrollIntoView(true);\n"
+ " }\n"
+ " }\n"
+ "}\n"
+ "\n"
+ "document.addEventListener(\"DOMContentLoaded\", function() {"
+ " cgit_line_range_highlight();\n"
+ "}, false);\n"
+ "</script>\n");
+}
I would prefer to have this in a file cgit.js (much like cgit.css).
OK... for the main part of it, it makes sense. And have it brought in
in HEAD. Because I think the direction of the JS stuff is that it will
only want to increase once it's a thing.
For the stuff using it or not though, it will still want to have its own
little <script> and schedule or call the main stuff inline.
-Andy
_______________________________________________
CGit mailing list
[email protected]
https://lists.zx2c4.com/mailman/listinfo/cgit