]> git.sesse.net Git - remoteglot/blobdiff - www/js/chessboard-0.3.0.js
Various fixes for running with advanced JS optimizations, if we want to do that in...
[remoteglot] / www / js / chessboard-0.3.0.js
index 851de8fc12eda325ed6233ffc20dfbfaee080172..e15ab00ff5d57b2d3ed61c6c683967e7f3b564b2 100644 (file)
@@ -1,7 +1,8 @@
 /*!
- * chessboard.js v0.3.0
+ * chessboard.js v0.3.0+asn
  *
  * Copyright 2013 Chris Oakman
+ * Portions copyright 2022 Steinar H. Gunderson
  * Released under the MIT license
  * http://chessboardjs.com/license
  *
@@ -367,24 +368,6 @@ function checkDeps() {
     containerEl = containerElOrId;
   }
 
-  // JSON must exist
-  if (! window.JSON ||
-      typeof JSON.stringify !== 'function' ||
-      typeof JSON.parse !== 'function') {
-    window.alert('ChessBoard Error 1004: JSON does not exist. ' +
-      'Please include a JSON polyfill.\n\nExiting...');
-    return false;
-  }
-
-  // check for a compatible version of jQuery
-  if (! (typeof window.$ && $.fn && $.fn.jquery &&
-      compareSemVer($.fn.jquery, MINIMUM_JQUERY_VERSION) === true)) {
-    window.alert('ChessBoard Error 1005: Unable to find a valid version ' +
-      'of jQuery. Please include jQuery ' + MINIMUM_JQUERY_VERSION + ' or ' +
-      'higher on the page.\n\nExiting...');
-    return false;
-  }
-
   return true;
 }
 
@@ -785,7 +768,7 @@ function animateSparePieceToSquare(piece, dest, completeFn) {
     duration: cfg.moveSpeed,
     complete: complete
   };
-  $(animatedPieceEl).animate(destOffset, opts);
+  //$(animatedPieceEl).animate(destOffset, opts);
 }
 
 function fadeIn(piece, onFinish) {
@@ -1158,7 +1141,7 @@ function trashDraggedPiece() {
 
   // hide the dragged piece
   // FIXME: support this for non-jquery
-  $(draggedPieceEl).fadeOut(cfg.trashSpeed);
+  //$(draggedPieceEl).fadeOut(cfg.trashSpeed);
 
   // set state
   DRAGGING_A_PIECE = false;