User:Jts1882/taxonomybrowser.js: Difference between revisions

Content deleted Content added
update to tested version
update
Line 128:
function getTreeList(taxon) {
//alert("hello from my test tree function: " + taxon) ;
// taxon = prompt("Please enter your name", taxon);
taxon = prompt("PleaseEnter enterthe yourparent nametaxon:", getTaxonName(taxon));
// top level taxon with empty ul tags
Line 156 ⟶ 157:
},
function( data ) {
var output = "" ;// an empty element with ID exists "<ul><br/>"
 
$.each ( data.query.search , function( index , sr ) {
Line 185 ⟶ 186:
//return encodeURIComponent(taxon);
}
function getTaxonName(taxon) {
var page = mw.config.get( 'wgPageName' )
 
if (page.includes("Template:Taxonomy/") ) {
var res = page.split("Template:Taxonomy/");
taxon = res[1];
}
return taxon;
}
//////////////////////////////////////////
function getTreeInteractive(taxon) {
//alert("hello from my test tree function: " + taxon) ;
taxon = prompt("Please enter your name", taxon);
taxon = prompt("Enter the parent taxon:", getTaxonName(taxon));
// top level taxon with empty ul tags