diff options
context:
space:
mode:
Diffstat (limited to 'assets/cgit.js')
-rw-r--r--assets/cgit.js29
1 file changed, 4 insertions, 25 deletions
diff --git a/assets/cgit.js b/assets/cgit.js
index 636ad33..c5bdf33 100644
--- a/assets/cgit.js
+++ b/assets/cgit.js
@@ -2,11 +2,10 @@
* The client side script that cgit serves with every page. Its main job is
* to refresh the relative ages that cgit_print_age renders in
* source/ui-shared.c, so the thresholds, suffixes and class names tabulated
- * below mirror the constants there and the two have to move together. Two
- * smaller pieces follow, the selects that reload the page when they change,
- * and the highlight laid over the source line a URL fragment names. Each
- * piece is wrapped in a function of its own so that nothing is left behind
- * in the global scope.
+ * below mirror the constants there and the two have to move together. One
+ * smaller piece follows, the highlight laid over the source line a URL
+ * fragment names. Each piece is wrapped in a function of its own so that
+ * nothing is left behind in the global scope.
*/
(function () {
@@ -97,26 +96,6 @@ document.addEventListener("DOMContentLoaded", function () {
})();
/*
- * Selects marked data-autosubmit reload the page with the new setting. They
- * are wired up from here rather than with an inline onchange handler because
- * a strict Content-Security-Policy blocks those, and a reader without
- * scripting still has the noscript reload button the forms carry.
- */
-
-(function () {
-
-document.addEventListener("DOMContentLoaded", function () {
- var i, selects = document.querySelectorAll("select[data-autosubmit]");
-
- for (i = 0; i < selects.length; i++)
- selects[i].addEventListener("change", function () {
- this.form.submit();
- });
-}, false);
-
-})();
-
-/*
* Washes a faded highlight over the source line a URL fragment names, either
* a single line as in #n231 or a range as in #n5-n12. The line anchors live
* in the number gutter, so the anchor is measured and a bar of the same