From 83b05a3ae26bdeb547600c21387980dff48e22ea Mon Sep 17 00:00:00 2001
From: Ben Sturmfels
Date: Tue, 7 May 2024 10:46:34 +1000
Subject: [PATCH] Begin jQuery removal
---
TODO.md | 4 +-
conservancy/static/js/conservancy.js | 55 +++++++++-------------
conservancy/templates/supporter/index.html | 47 ++++++++----------
3 files changed, 43 insertions(+), 63 deletions(-)
diff --git a/TODO.md b/TODO.md
index d030830d..1ea2031a 100644
--- a/TODO.md
+++ b/TODO.md
@@ -3,8 +3,6 @@
* ensure appropriate caching headers are used
* remove jQuery
* consider removing `events` and `worldmap` modules
-* split the template/content files out from `conservancy/static` into their own
- `content` directory (avoid mixing static and non-static content)
* ask Denver about why so many license files
* serve a 400 in Apache for a hostname we don't explicitly support
* use `` elements for supporter page hidden sections, rather than
@@ -15,6 +13,8 @@
# Done
+* split the template/content files out from `conservancy/static` into their own
+ `content` directory (avoid mixing static and non-static content)
* remove `ForceCanonicalHostnameMiddleware` by ensuring canonical redirect and
HTTPS redirect is done by Apache
* standardise settings to replace `settings.py` and `djangocommonsettings.py`
diff --git a/conservancy/static/js/conservancy.js b/conservancy/static/js/conservancy.js
index fb6fea34..dca9848b 100644
--- a/conservancy/static/js/conservancy.js
+++ b/conservancy/static/js/conservancy.js
@@ -5,7 +5,11 @@
** Find a copy of GPL at https://sfconservancy.org/GPLv3
*/
-$(document).ready(function() {
+function qs (selector) {
+ return document.querySelector(selector);
+}
+
+function init () {
/* When the browser doesn't support any video source, replace it
with the HTML inside the
Support Now!
- Become a Sustainer Now:
+ Become a Sustainer Now:
- Support us now!
+
-
-
-
+ Other annual sustainers methods:
- Other annual sustainers methods:
-
-
Wire Transfer
-
+
+ Wire Transfer
Contact Conservancy
- by email
for wire transfer instructions.
- Include currency & country.
-
-
+ by email for wire transfer instructions. Include currency & country.
+
-
-
Paper Check
-
- Send paper check for $120 to:
- Software Freedom Conservancy, Inc.
+
+ Paper Check
+ Send paper check for $120 to:
+ Software Freedom Conservancy, Inc.
137 MONTAGUE ST STE 380
- BROOKLYN, NY 11201-3548 USA
- Please write SUSTAINER
, t-shirt size, if you are renewing, and if
- you want public acknowledgment in memo line.
-
-
+ BROOKLYN, NY 11201-3548 USA
+ Please write SUSTAINER
, T-shirt size, if you are renewing, and if
+ you want public acknowledgment in memo line.
+
- Even More Ways to Donate
-
+ Even More Ways to Donate
{% endblock %}