Skip to content

jlevallois/scholar.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scholar.js shows dynamically your citation count on your publication list.

Travis Codacy grade David David

Aim

Show your publication count for all your publications, from Google Scholar.

Requirements

Usage

  • Import jQuery and scholar.js:

    <script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
    <script type="text/javascript" src="dist/scholar.min.js"></script>

    or from CDN (kha.li is my server):

    <script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
    <script type="text/javascript" src="http://kha.li/dist/scholar/scholar-0.1.1.min.js"></script>
  • Add span (or whatever) where you want to get your publication count:

    <span class="scholar" name="PUBLICATION-NAME" with-link="true"></span>

    or

    <span class="scholar" publi-id="PUBLICATION-ID" with-link="true"></span>

    Attributes:

    • class="scholar": enable parser.
    • publi-id="XXXX": publication ID (must be exactly the same as your Google Scholar publication).
    • or name="XXXXX": publication name (must be exactly the same as your Google Scholar publication).
    • with-link="true|false": (optional) add a link to the Google Scholar page of the publication.
  • Then, load results with your Google Scholar ID at the end of the page:

    Scholar.debug = true; // (optional) Enable debug message on console.
    Scholar.not_found_msg = '&#10008' // (optional) Customize the displayed result if the publication is not found.
    Scholar.load("YOUR-GOOGLE-SCHOLAR-ID"); // Find it on your Google Scholar profile

Example

<html>
  <head>
    <script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
    <script type="text/javascript" src="http://kha.li/dist/scholar/scholar-0.1.1.min.js"></script>
  </head>
  <body>
    <p>Integral based Curvature Estimators in Digital Geometry -
      <span class="scholar"
            name="Integral based Curvature Estimators in Digital Geometry"
            with-link="true">
        <!-- add a loading image here -->
      </span>
    </p>
    <script type="text/javascript">
      Scholar.load("-BL0_2EAAAAJ");
    </script>
  </body>
</html>

Result

Integral based Curvature Estimators in Digital Geometry - 18

Live Example

Contributors

License

All this work is under Creative Commons CC BY-NC-SA 4.0 license, see LICENSE.md

:octocat: