Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove jQuery #128

Open
martymcguire opened this issue Jul 23, 2024 · 1 comment
Open

remove jQuery #128

martymcguire opened this issue Jul 23, 2024 · 1 comment

Comments

@martymcguire
Copy link
Contributor

In ~June 2024 GitHub started sending Dependabot warnings about this repo using a "vulnerable" version of jQuery.

This site is read-only and doesn't accept user input, so I don't think there's any actual risk, here. However, a quick fix was done to update jQuery with #127

That should hold us for a while, but even better would be to remove reliance on jQuery altogether.

Each event page has a small section of JavaScript that uses jQuery. For example, summit.php:

  $(document)
    .ready(function() {

      // fix menu when passed
      $('.masthead')
        .visibility({
          once: false,
          onBottomPassed: function() {
            $('.fixed.menu').transition('fade in');
          },
          onBottomPassedReverse: function() {
            $('.fixed.menu').transition('fade out');
          }
        })
      ;

      // create sidebar and attach to menu open
      $('.ui.sidebar')
        .sidebar('attach events', '.toc.item')
      ;

    })
  ;

Near the bottom of the file is some JavaScript that interacts with a map widget, including a popup containing the venue address:

$(function(){
  $(".popup").popup();
});

The fixed menu behavior, sans the fades, could be accomplished with some CSS changes using position: fixed.

Similarly, the sidebar behavior could likely be accomplished with some CSS and the :target pseudoselector. (Or some vanilla Javascript).

The popup could be handled with vanilla Javascript, as well.

That's all I found with a quick look!

@aaronpk
Copy link
Member

aaronpk commented Jul 23, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants