-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #447 from spencermountain/dev
Dev
- Loading branch information
Showing
13 changed files
with
847 additions
and
796 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,30 @@ | ||
<html></html> | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="stylesheet" type="text/css" href="https://unpkg.com/spencer-css" /> | ||
</head> | ||
<body> | ||
<div class="m4"> | ||
client-side test for <a href="https://github.com/spencermountain/wtf_wikipedia">wtf_wikipedia</a> | ||
</div> | ||
<div class="m2"> | ||
<div>ES5 build:</div> | ||
<b class="m2" id="result">loading...</b> | ||
</div> | ||
|
||
<div class="m2"> | ||
<div>ESModule:</div> | ||
<b class="m2" id="module">loading...</b> | ||
</div> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="stylesheet" type="text/css" href="https://unpkg.com/spencer-css" /> | ||
</head> | ||
|
||
<body> | ||
<div class="m4"> | ||
client-side test for <a href="https://github.com/spencermountain/wtf_wikipedia">wtf_wikipedia</a> | ||
</div> | ||
<div class="m2"> | ||
<div>Radiohead members:</div> | ||
<b class="m2" id="result">loading...</b> | ||
</div> | ||
|
||
<!-- load minified build --> | ||
<script src="../builds/wtf_wikipedia-client.min.js"></script> | ||
<script defer> | ||
wtf.fetch('On a Friday', { lang: 'en' }).then((doc) => { | ||
let val = doc.infobox(0).get('current_members') | ||
let members = val.links().map((link) => link.page()) | ||
document.querySelector('#result').innerHTML = members.join(', ') | ||
}) | ||
</script> | ||
</body> | ||
|
||
<!-- load minified build --> | ||
<script src="../builds/wtf_wikipedia-client.min.js"></script> | ||
<script defer> | ||
wtf.fetch('On a Friday', { lang: 'en' }).then((doc) => { | ||
let val = doc.infobox(0).get('current_members') | ||
let members = val.links().map((link) => link.page()) | ||
document.querySelector('#result').innerHTML = members.join(', ') | ||
}) | ||
</script> | ||
</body> | ||
</html> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,29 @@ | ||
<html></html> | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="stylesheet" type="text/css" href="https://unpkg.com/spencer-css" /> | ||
</head> | ||
<body> | ||
<div class="m4"> | ||
client-side test for <a href="https://github.com/spencermountain/wtf_wikipedia">wtf_wikipedia</a> | ||
</div> | ||
<div class="m2"> | ||
<div>ES5 build:</div> | ||
<b class="m2" id="result">loading...</b> | ||
</div> | ||
|
||
<div class="m2"> | ||
<div>ESModule:</div> | ||
<b class="m2" id="module">loading...</b> | ||
</div> | ||
<!-- test es-module --> | ||
<script type="module"> | ||
import wtf from '../builds/wtf_wikipedia-client.mjs' | ||
wtf.fetch('Toronto Raptors').then(doc => { | ||
let coach = doc.infobox().get('coach') | ||
document.querySelector('#module').innerHTML = coach.text() //'Nick Nurse' | ||
}) | ||
</script> | ||
</body> | ||
</html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="stylesheet" type="text/css" href="https://unpkg.com/spencer-css" /> | ||
</head> | ||
|
||
<body> | ||
<div class="m4"> | ||
client-side test for <a href="https://github.com/spencermountain/wtf_wikipedia">wtf_wikipedia</a> | ||
</div> | ||
|
||
<div class="m2"> | ||
<div>Raptors Coach:</div> | ||
<b class="m2" id="module">loading...</b> | ||
</div> | ||
<!-- test es-module --> | ||
<script type="module"> | ||
import wtf from '../builds/wtf_wikipedia-client.mjs' | ||
wtf.fetch('Toronto Raptors').then(doc => { | ||
let coach = doc.infobox().get('coach') | ||
document.querySelector('#module').innerHTML = coach.text() //'Nick Nurse' | ||
}) | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="stylesheet" type="text/css" href="https://unpkg.com/spencer-css" /> | ||
</head> | ||
|
||
<body> | ||
<div class="m4"> | ||
client-side plugin demo for <a href="https://github.com/spencermountain/wtf_wikipedia">wtf_wikipedia</a> | ||
</div> | ||
<script src="https://unpkg.com/wtf_wikipedia"></script> | ||
<script src="https://unpkg.com/wtf-plugin-classify"></script> | ||
<script defer> | ||
window.onload = function () { | ||
wtf.plugin(window.wtfClassify) | ||
wtf.fetch('On a Friday', { lang: 'en' }).then((doc) => { | ||
document.querySelector('#result').innerHTML = ` | ||
<div >${doc.title()}</div> | ||
<pre >${JSON.stringify(doc.classify(), null, 2)}</pre> | ||
` | ||
}) | ||
} | ||
</script> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.