davvalent commited on 2022-05-18 02:54:23
Showing 1 changed files, with 20 additions and 1 deletions.
| ... | ... |
@@ -34,8 +34,27 @@ |
| 34 | 34 |
</script> |
| 35 | 35 |
</head> |
| 36 | 36 |
<body> |
| 37 |
- <h1>qdmtl.ca - SPARQL</h1> |
|
| 37 |
+ <h1>qdmtl.ca - <span id="titre">SPARQL</span></h1> |
|
| 38 | 38 |
<div id="yasgui"></div> |
| 39 | 39 |
<script src="js/yasgui-config.js"></script> |
| 40 |
+ <?php |
|
| 41 |
+ require 'parse-ini.php'; |
|
| 42 |
+ // ini en prod, inscrire "prod" |
|
| 43 |
+ if($infos['env'] == 'dev'): ?> |
|
| 44 |
+ <script> |
|
| 45 |
+ let tb = document.getElementById("titre");
|
|
| 46 |
+ tb.onclick = function(){
|
|
| 47 |
+ links = document.getElementsByClassName("iri");
|
|
| 48 |
+ for (let item of links) { // for...of, car links n'est pas de type Array.
|
|
| 49 |
+ console.log(item.href); |
|
| 50 |
+ let i = item.href; |
|
| 51 |
+ item.href = i.replace( |
|
| 52 |
+ "http://data.qdmtl.ca", |
|
| 53 |
+ "http://127.0.0.1/~david/dev-web/qdmtl-triple-store" |
|
| 54 |
+ ); |
|
| 55 |
+ } |
|
| 56 |
+ }; |
|
| 57 |
+ </script> |
|
| 58 |
+ <?php endif; ?> |
|
| 40 | 59 |
</body> |
| 41 | 60 |
</html> |
| 42 | 61 |