User:Karima Rafes/examplesparql.js

var title = mw.config.get( 'wgPageName' ); var lang = mw.config.get( 'wgContentLanguage' ); function refreshRecommendations { /*.get("https://io.datascience-paris-saclay.fr/sparql?"efault-graph-uri=&query=PREFIX+rdfs%3A%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0A%0D%0Aselect+*+where+%7B%0D%0A%0D%0A%3Fo+a+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fontology%23Item%3E+.%0D%0A%3Fo+rdfs%3Alabel+%3Flabel+.%0D%0A%7D+LIMIT+100&format=application%2Fsparql-results%2Bjson&timeout=0&debug=on", { title: title, lang: lang }, function(cats) {	 var buffer = new Array;	  for (var i in cats) {	    var cat = cats[i];	    buffer.push("")	    buffer.push(cat.title);	    buffer.push("")	  }	  $("#recommend").html(buffer.join(""));	});*/  } $(function {  $("#content").append(" #recommend a { display: inline-block; margin: 2px 5px; font-size: 0.9em } ")               .append(" Recommended Categories ");  refreshRecommendations;

});