Giter Site home page Giter Site logo

wikiblurb's Introduction

Wikiblurb.js

A jQuery Plugin for Wikipedia and Other Wikis. All you have to do is call it on an element and Wikiblurb will populate that element with data from a wiki...

<script type="text/javascript">
$(document).ready(function(){
    
    $('#article').wikiblurb();
    
    $('#otherWikiArticle').wikiblurb({
        wikiURL: "http://fallout.wikia.com/",
        apiPath: '',
        section: 0,
        page: 'Fallout',
        removeLinks: false,	    
        type: 'text',
        customSelector: '',
        callback: function(){ 
            console.log('Data loaded...');
        }
              
    });
    
});
</script>

Options

Below is a listing of options your can set....

Option Value Default Value Description Example
wikiURL String "http://en.wikipedia.org/" The base URL of the wiki you want to get data from with trailing slash included wikiURL: "http://fallout.wikia.com/"
apiPath String "w" Any additional path needed to be added to properly get data from the API (no slashes). Wikipedia uses "w" but often this will be an empty string for other wikis. wikiURL: ""
page String "Jimi_Hendrix" The name of the wiki page. page: "Brazil"
section Integer 0 The section of the wiki you want to get data from. section: 4
removeLinks Boolean false Setting this option to true will return just text data and will not have any links present. removeLinks: true
type String "all" Possible values are "text", "blurb", "infobox", and "custom" type: "infobox"
customSelector String "" If the type setting is set to "custom", then this is the selector that Wikiblurb will look for customSelector: ".mw-class"
callback Function function() { } Callback that executes after data has been successfully loaded function() { alert("Data loaded..."); }

wikiblurb's People

Contributors

9bitstudios avatar shefik avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.