Compare commits

..

3 Commits

Author SHA1 Message Date
3c20efaa3f Switched to own hosted cors-proxy
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2025-08-23 08:50:16 +01:00
3350d12255 Fix background colour
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2025-08-23 07:20:46 +01:00
18fe82dadd Use built-in innerHTML function
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2025-08-23 07:07:48 +01:00
4 changed files with 14 additions and 7 deletions

View File

@@ -60,7 +60,7 @@ function bindIt(obj, base = '', withFuncs = {}, onUpdate = ()=>{}) {
}
if (onUpdate !== undefined) {
requestAnimationFrame(() => {
onUpdate();
onUpdate(bindKey, value);
});
}
});

View File

@@ -75,7 +75,7 @@
<div class="handle" bind-it-to="bskyPost.handle"></div>
</div>
</div>
<div class="body" bind-it-to="bskyPost.text" bind-it-with="asHTML"></div>
<div class="body" bind-it-to="bskyPost.text" bind-it-with="innerHTML"></div>
<div class="embeds">
<div class="images" bind-it-to="bskyPost.images.exists" bind-it-with="visible">

View File

@@ -2,7 +2,7 @@
let {bskyPost, config} = bindIt(
{
config: {
corsProxy: `https://corsproxy.io/?url=`,
corsProxy: `https://cors-proxy.cluster.fun/`,
width: 600,
windowTitle: "$handle", // $handle, $displayName, $url
windowDecoration: true,
@@ -45,9 +45,6 @@
this.setAttribute('src', "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==");
}
},
asHTML: function(value) {
this.innerHTML = value;
},
setWidth: function(value) {
this.style.width = `${value}px`;
},
@@ -59,7 +56,13 @@
}
}
},
updateImage
(prop, val) => {
if (prop === "config.corsProxy") {
loadPost();
} else {
updateImage();
}
}
);
var updateImageTimeout;

View File

@@ -42,6 +42,10 @@ body {
left: -9999;
top: -9999;
margin-left: -10px;
overflow: hidden;
}
.post {
background: #fff;
}
.link {