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

RPB Chessboard dependent on jQuery ? #288

Open
HEXALIX opened this issue Apr 12, 2024 · 2 comments
Open

RPB Chessboard dependent on jQuery ? #288

HEXALIX opened this issue Apr 12, 2024 · 2 comments

Comments

@HEXALIX
Copy link

HEXALIX commented Apr 12, 2024

On my site, when i remove jquery script from the front-end, the chessboards are no longer visible.

add_filter( 'wp_enqueue_scripts', 'remove_default_jquery_script' );
function remove_default_jquery_script( ){
	wp_dequeue_script( 'jquery');
	wp_deregister_script( 'jquery');   
}

I'd like to remove the jquery script to improve my site's performance as much as possible.
Is the plugin really dependent on jquery ?

@yo35
Copy link
Owner

yo35 commented Apr 13, 2024

jQuery is used:

  1. for the popup navigation board (see example on https://rpb-chessboard.yo35.org/examples/chess-game/),
  2. for some components in the plugin admin pages,
  3. to query some DOM elements when rendering the chessboard and chessgame blocks.

It should be possible to get rid of jQuery for 2 and 3, but point 1 is blocking.

@tissatussa
Copy link

..to improve my site's performance as much as possible..

being a webdeveloper for many years (but retired now) i know loading jQuery is hardly a bottleneck in performance .. maybe you can use an older jQuery version which is less Kb but still has needed functionality ?

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

3 participants