Changes for page Bitcoin en Lightning

Last modified by XWikiGuest on 2026/03/11 21:09

From version 1.1
edited by XWikiGuest
on 2026/03/10 19:40
Change comment: There is no comment for this version
To version 2.1
edited by XWikiGuest
on 2026/03/11 19:07
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,1 +1,37 @@
1 1  Deze sectie wordt nog gevuld.
2 +
3 +{{html clean="false"}}
4 +<div id="linkding-bookmarks-tech-bitcoin">Laden...</div>
5 +<script>
6 +(function() {
7 + var config = {
8 + url: 'https://bookmarks.rhebergen.org/api/bookmarks/',
9 + token: '3b7443e0f84e2b2b269adebb96d7475e4a5e653e',
10 + tag: 'Bitcoin-&-Crypto',
11 + count: 10
12 + };
13 + var apiUrl = config.url + '?limit=' + config.count + '&q=%23' + encodeURIComponent(config.tag);
14 + fetch(apiUrl, {
15 + headers: { 'Authorization': 'Token ' + config.token }
16 + })
17 + .then(function(r) { return r.json(); })
18 + .then(function(data) {
19 + var container = document.getElementById('linkding-bookmarks-tech-bitcoin');
20 + var total = data.count || 0;
21 + var html = '<h3>Bookmarks: ' + config.tag + ' (' + total + ' totaal)</h3><ul>';
22 + (data.results || []).forEach(function(bm) {
23 + var title = bm.title || bm.website_title || bm.url;
24 + html += '<li><a href="' + bm.url + '" target="_blank">' + title + '</a></li>';
25 + });
26 + html += '</ul>';
27 + if (total > config.count) {
28 + html += '<p><em>Toont ' + config.count + ' van ' + total + '. <a href="https://bookmarks.rhebergen.org/bookmarks?q=%23' + config.tag + '">Meer in Linkding</a></em></p>';
29 + }
30 + container.innerHTML = html;
31 + })
32 + .catch(function(err) {
33 + document.getElementById('linkding-bookmarks-tech-bitcoin').innerHTML = '<p>Kon bookmarks niet laden: ' + err.message + '</p>';
34 + });
35 +})();
36 +</script>
37 +{{/html}}