Add pgn4web v2.80.
This commit is contained in:
27
_assets/vendor/pgn4web/fide-lookup.js
vendored
Normal file
27
_assets/vendor/pgn4web/fide-lookup.js
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* pgn4web javascript chessboard
|
||||
* copyright (C) 2009-2013 Paolo Casaschi
|
||||
* see README file and http://pgn4web.casaschi.net
|
||||
* for credits, license and more details
|
||||
*/
|
||||
|
||||
//
|
||||
// example of external javascript library enhancing pgn4web:
|
||||
// lookpup player info on the FIDE website based on FIDE id or name
|
||||
//
|
||||
|
||||
"use strict";
|
||||
|
||||
function openFidePlayerUrl(name, FideId) {
|
||||
if (FideId) { window.open("http://ratings.fide.com/card.phtml?event=" + escape(FideId)); }
|
||||
else if (name) { window.open("http://ratings.fide.com/seek.phtml?idcode=&name=" + name + "&offset=0"); }
|
||||
}
|
||||
|
||||
function customShortcutKey_Shift_1() {
|
||||
openFidePlayerUrl(gameWhite[currentGame], customPgnHeaderTag('WhiteFideId'));
|
||||
}
|
||||
|
||||
function customShortcutKey_Shift_2() {
|
||||
openFidePlayerUrl(gameBlack[currentGame], customPgnHeaderTag('BlackFideId'));
|
||||
}
|
||||
|
Reference in New Issue
Block a user