Anonymous

Changes

From KIproBatt Wiki
set url and label of root node in first query
Line 79: Line 79:  
                     .then(response => response.json())
 
                     .then(response => response.json())
 
                     .then(data => {
 
                     .then(data => {
                   
+
                    if (nodeID){ //first query on root node
 +
                    var rootNode = nodes.get(root);
 +
                    rootNode.url = data.query.results[root].fullurl;
 +
                    if (data.query.results[root].displaytitle) rootNode.label = data.query.results[root].displaytitle;
 +
                    }
 
                         for (var i = 0; i < properties.length; i++) {
 
                         for (var i = 0; i < properties.length; i++) {
 
                             for (var j = 0; j < data.query.results[root].printouts[properties[i]].length; j++) {
 
                             for (var j = 0; j < data.query.results[root].printouts[properties[i]].length; j++) {
Bots, bulkpusher, Bureaucrats, checkuser, filepusher, Interface administrators, oversight, pusher, rdfioadministrator, rdfiocurator, Administrators (Semantic MediaWiki), Curators (Semantic MediaWiki), Editors (Semantic MediaWiki), Administrators
5,444

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.