1/*
2 *  pgn4web javascript chessboard
3 *  copyright (C) 2009-2013 Paolo Casaschi
4 *  see README file and http://pgn4web.casaschi.net
5 *  for credits, license and more details
6 */
7
8//
9// example of external javascript library enhancing pgn4web:
10// lookpup player info on the FIDE website based on FIDE id or name
11//
12
13"use strict";
14
15function openFidePlayerUrl(name, FideId) {
16  if (FideId) { window.open("http://ratings.fide.com/card.phtml?event=" + escape(FideId)); }
17  else if (name) { window.open("http://ratings.fide.com/seek.phtml?idcode=&name=" + name + "&offset=0"); }
18}
19
20function customShortcutKey_Shift_1() {
21  openFidePlayerUrl(gameWhite[currentGame], customPgnHeaderTag('WhiteFideId'));
22}
23
24function customShortcutKey_Shift_2() {
25  openFidePlayerUrl(gameBlack[currentGame], customPgnHeaderTag('BlackFideId'));
26}
27
28