natetyler / wikiquotes-api Goto Github PK
View Code? Open in Web Editor NEWJavascript module for retrieving quotes from wikiquote.org via api calls
License: MIT License
Javascript module for retrieving quotes from wikiquote.org via api calls
License: MIT License
Is it possible to give an simple example to use one of your fabulous function?
Hi, this module is still using HTTP as the base API url , so the example app doesn't work for me because Chrome blocks this request.
Also the API response format seems to be changed, so even when it gets the response it can't parse it.
If a quotation contains anchor tags, getQuotesForSection will strip out the text within the tag and the quote will often make no sense. Suggest retaining the <a>
tags and pushing the text content, rather than the html, to quoteArray.
$(this).children().remove(':not(b,a)');
var $bolds = $(this).find('b');
// If the section has bold text, use it. Otherwise pull the plain text.
if ($bolds.length > 0) {
quoteArray.push($bolds.text());
} else {
quoteArray.push($(this).text());
}
Pushing the jQuery text used as a quick way to remove the anchor tag while retaining it's contents, which worked out for me, but may have consequences I didn't forsee,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.