Spaces:
Sleeping
Sleeping
Embedding Explorer: share neighbor views, clear URL after load, clean up console logs
Browse files- Share button captures selected neighbor + camera for neighbor view URLs
- Share URL params cleared after load (history.replaceState) so refresh is clean
- Removed console.log debug output from camera polling script
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -971,6 +971,19 @@ if(!location.search.includes("__theme=light")){
|
|
| 971 |
}, 500);
|
| 972 |
})();
|
| 973 |
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 974 |
"""
|
| 975 |
|
| 976 |
_LIGHT = {
|
|
|
|
| 971 |
}, 500);
|
| 972 |
})();
|
| 973 |
</script>
|
| 974 |
+
<script>
|
| 975 |
+
// Clear share params from URL after load (so refresh doesn't re-apply)
|
| 976 |
+
if (new URL(location).searchParams.has('q')) {
|
| 977 |
+
var _clearId = setInterval(function() {
|
| 978 |
+
if (document.querySelector('.js-plotly-plot')) {
|
| 979 |
+
var clean = new URL(location.pathname, location.origin);
|
| 980 |
+
clean.searchParams.set('__theme', 'light');
|
| 981 |
+
history.replaceState(null, '', clean.toString());
|
| 982 |
+
clearInterval(_clearId);
|
| 983 |
+
}
|
| 984 |
+
}, 500);
|
| 985 |
+
}
|
| 986 |
+
</script>
|
| 987 |
"""
|
| 988 |
|
| 989 |
_LIGHT = {
|