Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct namespace numbers #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions public_html/resources/js/wikidata.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ function WikiDataItem ( init_wd , init_raw ) {

// Methods
this.isPlaceholder = function () { return this.placeholder ; }
this.isItem = function () { return (this.raw||{ns:-1}).ns == 0 ; }
this.isProperty = function () { return (this.raw||{ns:-1}).ns == 120 ; }
this.isItem = function () { return (this.raw||{ns:-1}).ns == 120 ; }
this.isProperty = function () { return (this.raw||{ns:-1}).ns == 122 ; }
this.getID = function () { return (this.raw||{}).id ; }

this.getURL = function () {
Expand Down
2 changes: 1 addition & 1 deletion public_html/resources/vue/typeahead-search.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
$.getJSON ( 'https://www.wikidata.org/w/api.php?callback=?' , {
action:'query',
list:'search',
srnamespace:(me.type=='property'?120:0), // TODO lexemes'n'stuff
srnamespace:(me.type=='property'?122:120), // TODO lexemes'n'stuff
srlimit:(me.limit||10),
srsearch:query,
format:'json'
Expand Down