pinokiod 3.101.0 → 3.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/views/review.ejs +21 -0
package/package.json
CHANGED
package/server/views/review.ejs
CHANGED
|
@@ -965,5 +965,26 @@ body.dark .top-menu .btn2.selected {
|
|
|
965
965
|
<div class='appcanvas'>
|
|
966
966
|
<iframe src="<%=redirect_uri%>"></iframe>
|
|
967
967
|
</div>
|
|
968
|
+
<script>
|
|
969
|
+
(function () {
|
|
970
|
+
const frame = document.querySelector('.appcanvas iframe');
|
|
971
|
+
if (!frame) {
|
|
972
|
+
return;
|
|
973
|
+
}
|
|
974
|
+
window.addEventListener('message', (event) => {
|
|
975
|
+
console.debug('[review] message event', {
|
|
976
|
+
sourceMatches: event.source === frame.contentWindow,
|
|
977
|
+
origin: event.origin,
|
|
978
|
+
data: event.data
|
|
979
|
+
})
|
|
980
|
+
if (event.source !== frame.contentWindow) {
|
|
981
|
+
return;
|
|
982
|
+
}
|
|
983
|
+
if (event.data && event.data.type === 'pinokio:navigate-review') {
|
|
984
|
+
window.location.assign(event.data.targetUrl)
|
|
985
|
+
}
|
|
986
|
+
});
|
|
987
|
+
})();
|
|
988
|
+
</script>
|
|
968
989
|
</body>
|
|
969
990
|
</html>
|