Locations of Javascript files, especially for WW

15 views
Skip to first unread message

Rob Beezer

unread,
Jan 8, 2026, 9:36:39 PM (5 days ago) Jan 8
to prete...@googlegroups.com, David Farmer
We have a "js_lib" directory in the PreTeXt distribution. For historical
reasons. With some jQuery and some knowl stuff. Then we map it to
_static/js/lib during a build.

This might be the third time I've asked. I'm going to clean this up this time,
with or without advice.

1. Moving files. Any reason these files cannot move to the "js" directory of
the distribution? Any reason they cannot just be copied over to _static/js
like everything else?

2. Adjusting the code. Mostly the two relevant directories are prefixed by
variables like $html.jslib.dir. So finding places to adjust might be easy.
Exceptions

(a) WW JS for 2.16 and 2.17 have *strings* like
<script src="https://pretextbook.org/js/lib/knowl.js" defer></script>
with the path hardcoded. Please advise.

(b) mathknowl.js ends with two very similar hardcoded lines
MathJax.Ajax.loadComplete("http://pretextbook.org/js/lib/mathjaxknowl.js");
MathJax.Ajax.loadComplete("https://pretextbook.org/js/lib/mathjaxknowl.js");

(c) A literal FAQ. Verbatim from months back
"Is mathjaxknowl.js now obsolete? Replaced by the "3" version?"
That'd make (b) moot. Which is why I am trying to clean out some cruft.
Please help.

Rob

David W. Farmer

unread,
Jan 8, 2026, 10:07:03 PM (5 days ago) Jan 8
to 'Rob Beezer' via PreTeXt development

> 1. Moving files. Any reason these files cannot move to the "js" directory
> of the distribution? Any reason they cannot just be copied over to
> _static/js like everything else?

I am not aware of any reason.

> 2. Adjusting the code. Mostly the two relevant directories are prefixed by
> variables like $html.jslib.dir. So finding places to adjust might be easy.
> Exceptions
>
> (a) WW JS for 2.16 and 2.17 have *strings* like
> <script src="https://pretextbook.org/js/lib/knowl.js" defer></script>
> with the path hardcoded. Please advise.

Seems like a purely WW question to me.

> (b) mathknowl.js ends with two very similar hardcoded lines
> MathJax.Ajax.loadComplete("http://pretextbook.org/js/lib/mathjaxknowl.js");
> MathJax.Ajax.loadComplete("https://pretextbook.org/js/lib/mathjaxknowl.js");

I am guessing that there were issues with only having the "https"
when some pages were served "http".

> (c) A literal FAQ. Verbatim from months back
> "Is mathjaxknowl.js now obsolete? Replaced by the "3" version?"
> That'd make (b) moot. Which is why I am trying to clean out some cruft.

Yes, that sounds right to me.

Append to all of what I wrote above: "but I may not be the person which
the most up-to-date information about this".

Regards,

David

Rob Beezer

unread,
Jan 8, 2026, 10:27:23 PM (5 days ago) Jan 8
to prete...@googlegroups.com
Thanks, David, for the quick response. That gives me something to go on (but
for WW).

> Append to all of what I wrote above: "but I may not be the person which
> the most up-to-date information about this".

Aah, but you do have *some* information. ;-)

Rob

Alex Jordan

unread,
Jan 8, 2026, 10:43:58 PM (5 days ago) Jan 8
to prete...@googlegroups.com

This is an address at pretextbook.org, on the utmost server (or is it sl2x?)  Are you just moving files in the pretext repository, or also moving things on that web server? If the files being referenced here suddenly were not in the same place at pretextbook.org, anyone still using a book that was last built using one of those old webwork versions would stop working. Unless David or someone has some process that updates these files on pretextbook.org based on their places in the pretext repo, it doesn't seem like the changes you are proposing matter for WW.

Thanks for the reminder to announce the upcoming retirement (this summer) of support for 2.16, 2.17, and 2.18.

I'm sorry if I missed earlier requests. For a while I've not been opening pretext forum emails unless something caught my eye, to focus on some other things. I'm more back into it now.

--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDA0Mi5iZWV6ZXI.1767929240%40pnsh.

Rob Beezer

unread,
Jan 9, 2026, 10:02:11 AM (4 days ago) Jan 9
to prete...@googlegroups.com
Thanks very much, Alex. (You hadn't really missed much before, the WW thing was
fresh last night.)

I plan to

* Rearrange the relevant files in the repository (for clarity)

* Dump the JS files wholesale into _static/js (much as we do already, but can
now remove code for the "lib" exceptions)

* Adjust the necessary #script to point the right places

* Never ever touch an AIM WW server without talking to you first. And maybe not
even then

So it sounds like if you keep feeding the server and know what's up, nothing
should change and if you needed to rebuild, you would just need to look harder
for the files you need. Thanks for explaining that - it wasn't so clear to me.

And I saw your end-of-life announcement, so this should all be moot in a few
months anyway. (I'm glad we don't have to wait!)

Thanks,
Rob


On 1/8/26 19:43, Alex Jordan wrote:
> > https://pretextbook.org/js/lib/knowl.js <https://pretextbook.org/js/lib/knowl.js>
>
> This is an address at pretextbook.org <http://pretextbook.org>, on the utmost
> server (or is it sl2x?)  Are you just moving files in the pretext repository, or
> also moving things on that web server? If the files being referenced here
> suddenly were not in the same place at pretextbook.org <http://pretextbook.org>,
> anyone still using a book that was last built using one of those old webwork
> versions would stop working. Unless David or someone has some process that
> updates these files on pretextbook.org <http://pretextbook.org> based on their
> places in the pretext repo, it doesn't seem like the changes you are proposing
> matter for WW.
>
> Thanks for the reminder to announce the upcoming retirement (this summer) of
> support for 2.16, 2.17, and 2.18.
>
> I'm sorry if I missed earlier requests. For a while I've not been opening
> pretext forum emails unless something caught my eye, to focus on some other
> things. I'm more back into it now.
>
> On Thu, Jan 8, 2026 at 7:27 PM 'Rob Beezer' via PreTeXt development <pretext-
> d...@googlegroups.com <mailto:prete...@googlegroups.com>> wrote:
>
> Thanks, David, for the quick response.  That gives me something to go on (but
> for WW).
>
>  > Append to all of what I wrote above:  "but I may not be the person which
>  > the most up-to-date information about this".
>
> Aah, but you do have *some* information.  ;-)
>
> Rob
>
> On 1/8/26 19:07, David W. Farmer wrote:
> >
> >> 1.  Moving files.  Any reason these files cannot move to the "js"
> directory of
> >> the distribution?  Any reason they cannot just be copied over to _static/js
> >> like everything else?
> >
> > I am not aware of any reason.
> >
> >> 2.  Adjusting the code.  Mostly the two relevant directories are
> prefixed by
> >> variables like $html.jslib.dir.  So finding places to adjust might be easy.
> >> Exceptions
> >>
> >>   (a)  WW JS for 2.16 and 2.17 have *strings* like
> >>   <script src="https://pretextbook.org/js/lib/knowl.js <https://
> pretextbook.org/js/lib/knowl.js>" defer></script>
> >>   with the path hardcoded.  Please advise.
> >
> > Seems like a purely WW question to me.
> >
> >>   (b) mathknowl.js ends with two very similar hardcoded lines
> >>   MathJax.Ajax.loadComplete("http://pretextbook.org/js/lib/
> mathjaxknowl.js <http://pretextbook.org/js/lib/mathjaxknowl.js>");
> >>   MathJax.Ajax.loadComplete("https://pretextbook.org/js/lib/
> mathjaxknowl.js <https://pretextbook.org/js/lib/mathjaxknowl.js>");
> >
> > I am guessing that there were issues with only having the "https"
> > when some pages were served "http".
> >
> >>   (c) A literal FAQ.  Verbatim from months back
> >>   "Is  mathjaxknowl.js  now obsolete?  Replaced by the "3" version?"
> >>   That'd make (b) moot.  Which is why I am trying to clean out some cruft.
> >
> > Yes, that sounds right to me.
> >
> > Append to all of what I wrote above:  "but I may not be the person which
> > the most up-to-date information about this".
> >
> > Regards,
> >
> > David
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pretext-dev...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> MTAwMDA0Mi5iZWV6ZXI.1767929240%40pnsh <https://groups.google.com/d/msgid/
> pretext-dev/MTAwMDA0Mi5iZWV6ZXI.1767929240%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> CA%2BR-jregjHzeBjSZ%3Dv0YrF7vVhvij%2Buvo7W-hDdmgd_FVR-xVw%40mail.gmail.com
> <https://groups.google.com/d/msgid/pretext-dev/CA%2BR-
> jregjHzeBjSZ%3Dv0YrF7vVhvij%2Buvo7W-hDdmgd_FVR-xVw%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Rob Beezer

unread,
Jan 9, 2026, 10:54:56 AM (4 days ago) Jan 9
to prete...@googlegroups.com
I've got most of the rearrangement going on a branch (just ran out of time for a
few hours). Thanks for everyone's help.

@Andrew - I know you are now a JQuery removal specialist. We have three such
files. Can you easily tell if they are being used? And if so, could they be
replaced? They go back to the earliest days of PreTeXt (nee Mathbook XML).

Don't make a PR or anything right now, as these will move later today, I expect.
And if they can go away, I can incorporate that into current branch. Just an
audit would be great.

Thanks,
Rob

Alex Jordan

unread,
Jan 9, 2026, 12:24:47 PM (4 days ago) Jan 9
to prete...@googlegroups.com
That all sounds good as far as I would know. You mentioned an AIM WW server, but I might clarify that that's not quite what matters here. Before we had local js and css, one of the AIM web servers hosted js and css. That was back in the day when David could just edit a css file and instantly fix something for all published projects. So any builds from that era rely on those AIM web server hosted files. And then also more recent builds that still use someone's old WW server will also use those files.

So it's true that utmost and sl2x each have a WW instance. Also whichever one of those servers (utmost or sl2x) is the host of files like https://pretextbook.org/js/lib/knowl.js, those files are on that server in a separate place from the WW instance, at a different domain.

To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAwMi5iZWV6ZXI.1767974094%40pnsh.

Rob Beezer

unread,
Jan 9, 2026, 3:08:36 PM (4 days ago) Jan 9
to prete...@googlegroups.com
On 1/9/26 07:54, 'Rob Beezer' via PreTeXt development wrote:
> @Andrew - I know you are now a JQuery removal specialist.  We have three such
> files.  Can you easily tell if they are being used?  And if so, could they be
> replaced?  They go back to the earliest days of PreTeXt (nee Mathbook XML).

Trying to answer my own question. Grep'ing the "js" folder, before moving
things around, I looked for

$( and jQuery(

grep -R '\$\s*(' *.js
grep -R 'jQuery\s*(' *.js

The former showed up 141 times, the latter is mostly in the WW JS (3 times or so
per WW version).

Don't know if this means the "sticky" and "espy" files are extra/obsolete?

We seem to have a v3.3.1 main jQuery file, a 2018 release. Should we be
getting this from a CDN? Do we expect a lot of work if we just moved to the
latest version?

I'd bet my naivete is showing...

Rob

Rob Beezer

unread,
Jan 9, 2026, 3:28:00 PM (4 days ago) Jan 9
to prete...@googlegroups.com
Just pushed the discussed changes. Not sure if any PRs touched the moving JS,
but they might need a rebase and force-push.

Unclear if teh CLI will need to react - I don't know if they do anything
different when it comes to creating the _static directory in an HTML build.

On to other things, until I have more to go on. Thanks to David F and Alex for
the prompt help.

Rob

Andrew Scholer

unread,
Jan 9, 2026, 3:44:14 PM (4 days ago) Jan 9
to prete...@googlegroups.com
That looks like a reasonable way to check for JQuery.

I would expect some, but not tons, of work to move to the latest version. That said, a better goal would be to excise it from PreTeXt's JS. At this point in web development, if you are not working with legacy code that is deeply invested in JQuery, or you do not have a clear plan for why you are going to rely on JQuery to do something way more cleanly than would be possible with vanilla JS, you probably shouldn't bother with it.

 I would suggest ripping the uses out of core JS files.  If WW wants/needs jquery or wants to leverage it, that code should import jquery directly. I'd be happy to help with that at some point (though not right now).

The advantage to having the local copy of jquery.min.js is presumably helping make HTML builds work offline. Other than that reason, it would be better to point to the correct version of JQuery from a CDN. (Assuming no one has modified the minified local version).

sticky and espy appear to be local forks of jquery based libraries (https://github.com/darsain/espy). I can't see where they are getting used.

Andrew



--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAzNS5iZWV6ZXI.1767989312%40pnsh.

Rob Beezer

unread,
Jan 9, 2026, 4:00:33 PM (4 days ago) Jan 9
to prete...@googlegroups.com
Thanks, Andrew. I might experiment ripping out "sticky" and "espy" entirely.

> That said, a better goal would be to excise it from PreTeXt's JS.

I thought so.

I think the WW use is minimal, and perhaps Alex could do that? Maybe even
backport the changes?

It'd be great to have a volunteer with the right skills who might be willing to
do this. "Volunteer" means somebody besides Oscar and Andrew, who have plenty
of projects going. Maybe it could go file-by-file - there look to be five
"core" affected files.

Thanks for the insights.

Rob


On 1/9/26 12:43, Andrew Scholer wrote:
> That looks like a reasonable way to check for JQuery.
>
> I would expect some, but not tons, of work to move to the latest version. That
> said, a better goal would be to excise it from PreTeXt's JS. At this point in
> web development, if you are not working with legacy code that is deeply invested
> in JQuery, or you do not have a clear plan for why you are going to rely on
> JQuery to do something way more cleanly than would be possible with vanilla JS,
> you probably shouldn't bother with it.
>
>  I would suggest ripping the uses out of core JS files. If WW wants/needs
> jquery or wants to leverage it, that code should import jquery directly. I'd be
> happy to help with that at some point (though not right now).
>
> The advantage to having the local copy of jquery.min.js is presumably helping
> make HTML builds work offline. Other than that reason, it would be better to
> point to the correct version of JQuery from a CDN. (Assuming no one has
> modified the minified local version).
>
> sticky and espy appear to be local forks of jquery based libraries (https://
> github.com/darsain/espy <https://github.com/darsain/espy>). I can't see where
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> MTAwMDAzNS5iZWV6ZXI.1767989312%40pnsh <https://groups.google.com/d/msgid/
> pretext-dev/MTAwMDAzNS5iZWV6ZXI.1767989312%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> CACm44N_SqiFerCChSXaeLy8OxO2%2ByY6Xvnp4tg6iauaS30hWBg%40mail.gmail.com <https://
> groups.google.com/d/msgid/pretext-dev/
> CACm44N_SqiFerCChSXaeLy8OxO2%2ByY6Xvnp4tg6iauaS30hWBg%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

David W. Farmer

unread,
Jan 9, 2026, 4:22:05 PM (4 days ago) Jan 9
to 'Rob Beezer' via PreTeXt development

I think sticky and espy were from prior attempts to do things like auto
scroll the TOC. Glad to see them go.
> email to pretext-dev...@googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/pretext-dev/MTAwMDAxMS5iZWV6ZXI.1767992429%40pnsh.
>
>

Rob Beezer

unread,
Jan 9, 2026, 5:21:19 PM (4 days ago) Jan 9
to prete...@googlegroups.com
On 1/9/26 13:22, David W. Farmer wrote:
> I think sticky and espy were from prior attempts to do things like auto
> scroll the TOC.  Glad to see them go.

<visible-smirk/>

Yes, that is how I remember it. Long long ago in a place far away.

Haris Skiadas

unread,
Jan 9, 2026, 6:34:12 PM (4 days ago) Jan 9
to prete...@googlegroups.com, prete...@googlegroups.com
I’d be happy to volunteer to work on excising jquery. Depending on what timing we are looking at of course. But as I am teaching webapps right now it fits with stuff I would be thinking about anyway.

Sent from my iPad

> On Jan 9, 2026, at 5:21 PM, 'Rob Beezer' via PreTeXt development <prete...@googlegroups.com> wrote:
> --
> You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAzNC5iZWV6ZXI.1767997277%40pnsh.

Rob Beezer

unread,
Jan 9, 2026, 7:41:47 PM (4 days ago) Jan 9
to prete...@googlegroups.com
Excellent! Thanks, Haris. No timeline, at your leisure! (We don't like
deadlines, but I guess, who does?)

And if you want to do a separate PR for each file, that might be a great way to
go for everybody involved. Start with whichever one looks simplest or
least-dangerous.

Rob

Bradley Miller

unread,
Jan 9, 2026, 7:46:39 PM (4 days ago) Jan 9
to prete...@googlegroups.com, prete...@googlegroups.com
That is how we are doing it On runestone as well. I would also as that copilot and gpt are very good at the conversion.

Brad
Sent from my iPhone

> On Jan 9, 2026, at 4:41 PM, 'Rob Beezer' via PreTeXt development <prete...@googlegroups.com> wrote:
>
> Excellent! Thanks, Haris. No timeline, at your leisure! (We don't like deadlines, but I guess, who does?)
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAxNC5iZWV6ZXI.1768005706%40pnsh.

Rob Beezer

unread,
Jan 11, 2026, 12:50:44 PM (2 days ago) Jan 11
to prete...@googlegroups.com
I've removed the "sticky" and "espy" Javascript libraries - from the repository
and from the HTML builds. Nothing startling in the console, nor any obvious
adverse impact on navigation. But if bad things do happen, it is an easy commit
to revert. Website samples being updated just now.

Haris has started a tracking issue for JQuery elimination (thanks, Haris!).
https://github.com/PreTeXtBook/pretext/issues/2764

I've got my eye on some console messages from js/pretext_add_on.js that
suggest debugging info for features we do not really support anymore, so there
might be a few more things to trim.

Rob

Rob Beezer

unread,
Jan 11, 2026, 1:16:34 PM (2 days ago) Jan 11
to prete...@googlegroups.com
On 1/11/26 09:50, 'Rob Beezer' via PreTeXt development wrote:
> I've got my eye on some console messages from  js/pretext_add_on.js  that
> suggest debugging info for features we do not really support anymore, so there
> might be a few more things to trim.

Maybe just for David Farmer, but perhaps others, too. Some (good, old)
experiments indicated in the console log.

1. debug.editable; enabling editing experiments

Is David still using this in editing projects? Is Oscar and Stevens's recent
work built on this? HTML then creates a whole series of chunked source files.
I don't think CodeChat relies on these? (CodeChat is another discussion.)

A conditional stanza in HTML to create these files, and a JS flag. The flag
does not see much use in PreTeXt proper (see (2)).

2. Various JS experiments

minivers variable leads to LoadResource(), which leads to an addEventListener().
This is tied up with locating source files for (1), a reader survey from the
SoundWriting project, some logins leftover from UTMOST (iirc), and some things
conditional on the "pretext-SA" document id. Does any of this need to be saved?

Rob

David W. Farmer

unread,
Jan 11, 2026, 2:22:19 PM (2 days ago) Jan 11
to 'Rob Beezer' via PreTeXt development

I am pretty sure Oscar's work is not using my old editing-in-place
experiments.

Unless someone else sees a need, I say trash it all :).

Regards,

David
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pretext-dev...@googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/pretext-dev/MTAwMDAwOS5iZWV6ZXI.1768155392%40pnsh.
>
>

Rob Beezer

unread,
Jan 11, 2026, 2:45:36 PM (2 days ago) Jan 11
to prete...@googlegroups.com
Thanks very much, David. I'll try to make some surgical commits so that some of
this can be resurrected if folks want to look at it later. And it'll sit on a
branch for a bit if anyone else has input right now.

Rob

Oscar Levin

unread,
Jan 11, 2026, 2:46:29 PM (2 days ago) Jan 11
to prete...@googlegroups.com
The visual editor stuff is completely independent of any JavaScript in Pretext.

Related, Andrew and I have chatted over the last few years about trying to use a bundler for JavaScript so that all the various functions can be better organized.  I think this is still worth doing, and all of the work that is currently happening would make that easier eventually.  But we should probably be strategic if there will be more reorganizing.

Oscar.

Rob Beezer

unread,
Jan 11, 2026, 3:33:44 PM (2 days ago) Jan 11
to prete...@googlegroups.com
Thanks, Oscar.

I just plan to clean out this stuff, and I should be at the limit of my pay
grade. We might not interfere with Haris and JQuery? Otherwise, some sort of
bundling should be fine. (I hope!). I've wondered about the role of
"pretext_add_on.js".

Thanks for checking off. I'll try to finish my current task very soon.

Rob
> > To view this discussion visit
> > https://groups.google.com/d/msgid/pretext-dev/
> MTAwMDAwOS5iZWV6ZXI.1768155392%40pnsh <https://groups.google.com/d/msgid/
> pretext-dev/MTAwMDAwOS5iZWV6ZXI.1768155392%40pnsh>.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> eb82bd59-e651-5571-31b-c4c86fb8a892%40aimath.org <https://groups.google.com/
> d/msgid/pretext-dev/eb82bd59-e651-5571-31b-c4c86fb8a892%40aimath.org>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> CAOU9BaXd9ecDa7vq_9Zptfyw9b8Fou-ns8PqcMjz7Xp_WiBotQ%40mail.gmail.com <https://
> groups.google.com/d/msgid/pretext-dev/CAOU9BaXd9ecDa7vq_9Zptfyw9b8Fou-
> ns8PqcMjz7Xp_WiBotQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Andrew Scholer

unread,
Jan 11, 2026, 4:21:37 PM (2 days ago) Jan 11
to prete...@googlegroups.com
I think it does make sense to go in stages:

a) Remove unnecessary files
b) Remove completely orphaned code from leftover files
c) Remove jquery
d) Create a build system and reorg the code to be more modular

b + c could be reversed. But the work to make sure that c did not break anything overlaps heavily with the work in b to identify what is cruft.

To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDA0NS5iZWV6ZXI.1768163622%40pnsh.

Rob Beezer

unread,
Jan 11, 2026, 10:10:21 PM (2 days ago) Jan 11
to prete...@googlegroups.com
I'm done removing obsolete bits of Javascript. Well, done removing what I am
comfortable removing. Mostly. One last round of questions/confirmations.

I think the following are now no longer used. David - I think you have the answer.

edit.js
login.js
highlights.js

We have also have

pretext_search.js
ptx_search.js

We definitely use the former (in conjunction with Lunr), I don't see the latter
being used. Anybody have a reason to keep the latter?

Rob

Rob Beezer

unread,
Jan 11, 2026, 10:13:50 PM (2 days ago) Jan 11
to prete...@googlegroups.com
Sounds good. I am going to get out of the way (after resolving one last query
just now). The combination of my skills and my involvement with various feature
development work has hit its limit.

PRs with more clean-up welcome!

Rob

On 1/11/26 13:20, Andrew Scholer wrote:
> I think it does make sense to go in stages:
>
> a) Remove unnecessary files
> b) Remove completely orphaned code from leftover files
> c) Remove jquery
> d) Create a build system and reorg the code to be more modular
>
> b + c could be reversed. But the work to make sure that c did not break anything
> overlaps heavily with the work in b to identify what is cruft.
>
> On Sun, Jan 11, 2026 at 12:33 PM 'Rob Beezer' via PreTeXt development <pretext-
> d...@googlegroups.com <mailto:prete...@googlegroups.com>> wrote:
>
> Thanks, Oscar.
>
> I just plan to clean out this stuff, and I should be at the limit of my pay
> grade.  We might not interfere with Haris and JQuery?  Otherwise, some sort of
> bundling should be fine.  (I hope!).  I've wondered about the role of
> "pretext_add_on.js".
>
> Thanks for checking off.  I'll try to finish my current task very soon.
>
> Rob
>
> On 1/11/26 11:46, Oscar Levin wrote:
> > The visual editor stuff is completely independent of any JavaScript in
> Pretext.
> >
> > Related, Andrew and I have chatted over the last few years about trying
> to use a
> > bundler for JavaScript so that all the various functions can be better
> > organized.  I think this is still worth doing, and all of the work that is
> > currently happening would make that easier eventually.  But we should
> probably
> > be strategic if there will be more reorganizing.
> >
> > Oscar.
> >
> > On Sun, Jan 11, 2026, 12:22 PM David W. Farmer <far...@aimath.org
> <mailto:far...@aimath.org>
> dev%2Bunsu...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> > dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>.
> >      > To view this discussion visit
> >      > https://groups.google.com/d/msgid/pretext-dev/ <https://
> groups.google.com/d/msgid/pretext-dev/>
> >     MTAwMDAwOS5iZWV6ZXI.1768155392%40pnsh <https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >     pretext-dev/MTAwMDAwOS5iZWV6ZXI.1768155392%40pnsh>.
> >      >
> >      >
> >
> >     --
> >     You received this message because you are subscribed to the Google Groups
> >     "PreTeXt development" group.
> >     To unsubscribe from this group and stop receiving emails from it, send an
> >     email to pretext-dev...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> > dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>.
> >     To view this discussion visit https://groups.google.com/d/msgid/
> pretext-dev/ <https://groups.google.com/d/msgid/pretext-dev/>
> >     eb82bd59-e651-5571-31b-c4c86fb8a892%40aimath.org
> <http://40aimath.org> <https://groups.google.com/ <https://groups.google.com/>
> >     d/msgid/pretext-dev/eb82bd59-e651-5571-31b-c4c86fb8a892%40aimath.org
> <http://40aimath.org>>.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "PreTeXt development" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> email
> > to pretext-dev...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>>.
> > To view this discussion visit https://groups.google.com/d/msgid/pretext-
> dev/ <https://groups.google.com/d/msgid/pretext-dev/>
> > CAOU9BaXd9ecDa7vq_9Zptfyw9b8Fou-ns8PqcMjz7Xp_WiBotQ%40mail.gmail.com
> <http://40mail.gmail.com> <https://
> > groups.google.com/d/msgid/pretext-dev/CAOU9BaXd9ecDa7vq_9Zptfyw9b8Fou-
> <http://groups.google.com/d/msgid/pretext-dev/CAOU9BaXd9ecDa7vq_9Zptfyw9b8Fou->
> > ns8PqcMjz7Xp_WiBotQ%40mail.gmail.com?utm_medium=email&utm_source=footer
> <http://40mail.gmail.com?utm_medium=email&utm_source=footer>>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pretext-dev...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> MTAwMDA0NS5iZWV6ZXI.1768163622%40pnsh <https://groups.google.com/d/msgid/
> pretext-dev/MTAwMDA0NS5iZWV6ZXI.1768163622%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> CACm44N9voeTe4KEZCvr5TT7uLuCQrSdzXxD6BqFWtxX7b9x6dA%40mail.gmail.com <https://
> groups.google.com/d/msgid/pretext-dev/
> CACm44N9voeTe4KEZCvr5TT7uLuCQrSdzXxD6BqFWtxX7b9x6dA%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

David W. Farmer

unread,
Jan 12, 2026, 3:02:16 AM (yesterday) Jan 12
to 'Rob Beezer' via PreTeXt development

Okay to remove


edit.js
login.js
highlights.js

(I recall it being called "highlight.js" :)


Rob Beezer

unread,
Jan 12, 2026, 10:41:31 AM (yesterday) Jan 12
to prete...@googlegroups.com
Right, highlight.js. Lots of plurals in the code, I think. And I think I
missed instructor.js and answer.js, which I will remove also. Thanks again,
David, for reviewing these.

Asked AI to check my work. Only new suspicious routine it found was
"WWiFrameReseed()".

Last two questions, I promise.

Alex - is this used somewhere else I'm not seeing? Or should it be trashed?

Brad, David - there is an event listener, conditional on "judson-AATA" that
references "eBookConfig()" (a Runesone thing), and uses some PreTeXt "trails.js"
that I'm not seeing anywhere. Comment says "a hack for hosted tracking".
Extraneous?

Thanks,
Rob

David W. Farmer

unread,
Jan 12, 2026, 11:18:03 AM (yesterday) Jan 12
to 'Rob Beezer' via PreTeXt development

trails.js is what we used to get those "heat maps".

So, definitely nontrivial work, but now obsolete.

And yes, something was conditional on AATA for reasons I forget.
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pretext-dev...@googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/pretext-dev/MTAwMDA0Mi5iZWV6ZXI.1768232489%40pnsh.
>

Rob Beezer

unread,
Jan 12, 2026, 4:58:36 PM (20 hours ago) Jan 12
to prete...@googlegroups.com
On 1/12/26 08:18, David W. Farmer wrote:
> trails.js is what we used to get those "heat maps".

Ah, yes. Good name, but it didn't ring a bell at first.

> So, definitely nontrivial work, but now obsolete.

Definitely nontrivial. That was good work. And I don't see the file anywhere
in the repository. If you want it there for safekeeping, make a pull request,
which I will merge, and then I will immediately remove it! ;-)

Rob

Alex Jordan

unread,
Jan 12, 2026, 5:34:11 PM (20 hours ago) Jan 12
to prete...@googlegroups.com
I do not know what WWiFrameReseed() is. No hits with `git log -S WWiFrameReseed`. Is it an AI hallucination?

So I guess I'm saying trash it. If something breaks, I'll try to repair it quickly.



--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDA0Mi5iZWV6ZXI.1768232489%40pnsh.

Rob Beezer

unread,
Jan 12, 2026, 5:48:32 PM (19 hours ago) Jan 12
to prete...@googlegroups.com
Thanks for checking.

Not a hallucination - real now in "pretext_add_on.js". I mis-capitalized it.
Or you did when you defined it. ;-) Not "iFrame", but just "iframe".

Now I see that it is tied up with a "Randomize" button?

Search also on "b-webwork-inline-randomize" in the XSL.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> MTAwMDA0Mi5iZWV6ZXI.1768232489%40pnsh <https://groups.google.com/d/msgid/
> pretext-dev/MTAwMDA0Mi5iZWV6ZXI.1768232489%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> CA%2BR-jrfDLwSvibbLEkLiiPX3ObLhwQB05s1co5rFQO5HJcB%2Bjg%40mail.gmail.com
> <https://groups.google.com/d/msgid/pretext-dev/CA%2BR-
> jrfDLwSvibbLEkLiiPX3ObLhwQB05s1co5rFQO5HJcB%2Bjg%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Alex Jordan

unread,
Jan 12, 2026, 5:56:29 PM (19 hours ago) Jan 12
to prete...@googlegroups.com
Ah OK. It seems to have been a thing that only was meant for 2.15 and earlier, which we retired last year. Sorry I didn't catch that at the "retirement party".

See:
where its use appears (and is removed) in the diff. The comment confirms.



To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDA0OC5iZWV6ZXI.1768258110%40pnsh.

Rob Beezer

unread,
Jan 12, 2026, 6:34:41 PM (19 hours ago) Jan 12
to prete...@googlegroups.com
Done. I've reached my limit. Many commits (surprised?) so that if bits and
pieces need to come back they will be discoverable. Thanks for everyone's help
confirming what is now cruft and what is not.

Likely more that can be done, but perhaps that can be part of a reorganization.
On to other things.

Rob

On 1/12/26 14:56, Alex Jordan wrote:
> Ah OK. It seems to have been a thing that only was meant for 2.15 and earlier,
> which we retired last year. Sorry I didn't catch that at the "retirement party".
>
> See:
> https://github.com/PreTeXtBook/pretext/pull/2489 <https://github.com/
> PreTeXtBook/pretext/pull/2489>
> where its use appears (and is removed) in the diff. The comment confirms.
>
>
>
> On Mon, Jan 12, 2026 at 2:48 PM 'Rob Beezer' via PreTeXt development <pretext-
> d...@googlegroups.com <mailto:prete...@googlegroups.com>> wrote:
>
> Thanks for checking.
>
> Not a hallucination - real now in "pretext_add_on.js".  I mis-capitalized it.
> Or you did when you defined it.  ;-)  Not "iFrame", but just "iframe".
>
> Now I see that it is tied up with a "Randomize" button?
>
> Search also on "b-webwork-inline-randomize" in the XSL.
>
>
> On 1/12/26 14:33, Alex Jordan wrote:
> > I do not know what WWiFrameReseed() is. No hits with `git log -S
> > WWiFrameReseed`. Is it an AI hallucination?
> >
> > So I guess I'm saying trash it. If something breaks, I'll try to repair
> it quickly.
> >
> >
> >
> > On Mon, Jan 12, 2026 at 7:41 AM 'Rob Beezer' via PreTeXt development
> <pretext-
> > d...@googlegroups.com <mailto:d...@googlegroups.com> <mailto:pretext-
> <mailto:dev%252Buns...@googlegroups.com>>.
> >     To view this discussion visit https://groups.google.com/d/msgid/
> pretext-dev/ <https://groups.google.com/d/msgid/pretext-dev/>
> >     MTAwMDA0Mi5iZWV6ZXI.1768232489%40pnsh <https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >     pretext-dev/MTAwMDA0Mi5iZWV6ZXI.1768232489%40pnsh>.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "PreTeXt development" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> email
> > to pretext-dev...@googlegroups.com <mailto:pretext-
> <mailto:dev%2Bunsu...@googlegroups.com>>.
> > To view this discussion visit https://groups.google.com/d/msgid/pretext-
> dev/ <https://groups.google.com/d/msgid/pretext-dev/>
> > CA%2BR-jrfDLwSvibbLEkLiiPX3ObLhwQB05s1co5rFQO5HJcB%2Bjg%40mail.gmail.com
> <http://40mail.gmail.com>
> > <https://groups.google.com/d/msgid/pretext-dev/CA%2BR- <https://
> groups.google.com/d/msgid/pretext-dev/CA%2BR->
> > jrfDLwSvibbLEkLiiPX3ObLhwQB05s1co5rFQO5HJcB%2Bjg%40mail.gmail.com
> <http://40mail.gmail.com>?
> > utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> MTAwMDA0OC5iZWV6ZXI.1768258110%40pnsh <https://groups.google.com/d/msgid/
> pretext-dev/MTAwMDA0OC5iZWV6ZXI.1768258110%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> CA%2BR-jretAxeX5G_riTs%2Brhng-DBAA7Q8LF21dAgypdv7ffOvYQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/pretext-dev/CA%2BR-jretAxeX5G_riTs%2Brhng-
> DBAA7Q8LF21dAgypdv7ffOvYQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages