Spaces:
Running
Running
Update 2.html
Browse files
2.html
CHANGED
@@ -57,9 +57,10 @@
|
|
57 |
<script>document.getElementById("username").value = "izum"+localStorage.getItem("no")+"@mbox.re";</script>
|
58 |
<input style="display: none;" autocomplete="current-password" class="form-input" name="password" placeholder="Password" required="" type="password" value="!Aaaaaa0"></label>
|
59 |
<div>
|
60 |
-
<button class="btn btn-lg w-full" type="submit">1.このボタンをクリック</button>
|
61 |
</div>
|
62 |
-
|
|
|
63 |
<div><b>2.下記の画像のように操作し、色の付いていないメッシュを作成する。</b>
|
64 |
<img src="img1.png" alt="手順画像">
|
65 |
作成されたメッシュの例:
|
@@ -83,38 +84,39 @@
|
|
83 |
style="height: 350px;">
|
84 |
</model-viewer>
|
85 |
</li>
|
86 |
-
|
87 |
<script>
|
88 |
let pipWindow = null; // PiPウィンドウを保存する変数
|
89 |
|
90 |
-
|
91 |
-
|
92 |
-
// タブから離れたとき
|
93 |
-
if ('documentPictureInPicture' in window) {
|
94 |
-
try {
|
95 |
-
pipWindow = await documentPictureInPicture.requestWindow();
|
96 |
-
pipWindow.document.body.innerHTML = document.body.innerHTML;
|
97 |
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
});
|
103 |
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
}
|
|
|
|
|
|
|
114 |
}
|
115 |
});
|
116 |
</script>
|
117 |
-
|
118 |
-
|
119 |
</body>
|
120 |
</html>
|
|
|
57 |
<script>document.getElementById("username").value = "izum"+localStorage.getItem("no")+"@mbox.re";</script>
|
58 |
<input style="display: none;" autocomplete="current-password" class="form-input" name="password" placeholder="Password" required="" type="password" value="!Aaaaaa0"></label>
|
59 |
<div>
|
60 |
+
<button class="btn btn-lg w-full" type="submit" id="open">1.このボタンをクリック</button>
|
61 |
</div>
|
62 |
+
<div id="hide">
|
63 |
+
<li>
|
64 |
<div><b>2.下記の画像のように操作し、色の付いていないメッシュを作成する。</b>
|
65 |
<img src="img1.png" alt="手順画像">
|
66 |
作成されたメッシュの例:
|
|
|
84 |
style="height: 350px;">
|
85 |
</model-viewer>
|
86 |
</li>
|
87 |
+
</div>
|
88 |
<script>
|
89 |
let pipWindow = null; // PiPウィンドウを保存する変数
|
90 |
|
91 |
+
// 初期状態で #hide を非表示にする
|
92 |
+
document.getElementById('hide').style.display = 'none';
|
|
|
|
|
|
|
|
|
|
|
93 |
|
94 |
+
// ボタンのイベントリスナーを設定
|
95 |
+
document.getElementById('open').addEventListener('click', async () => {
|
96 |
+
// まず #hide を非表示にしておく
|
97 |
+
document.getElementById('hide').style.display = 'none';
|
|
|
98 |
|
99 |
+
if ('documentPictureInPicture' in window) {
|
100 |
+
try {
|
101 |
+
pipWindow = await documentPictureInPicture.requestWindow();
|
102 |
+
pipWindow.document.body.innerHTML = "<iframe src='3.html' style='width:100%; height:100%; border:0;'></iframe>";
|
103 |
+
|
104 |
+
// スタイルもコピーする
|
105 |
+
const styles = document.querySelectorAll('style, link[rel="stylesheet"]');
|
106 |
+
styles.forEach(style => {
|
107 |
+
pipWindow.document.head.appendChild(style.cloneNode(true));
|
108 |
+
});
|
109 |
+
|
110 |
+
} catch (error) {
|
111 |
+
console.error('PiPウィンドウ起動エラー:', error);
|
112 |
+
// エラーが起きたら #hide を表示する
|
113 |
+
document.getElementById('hide').style.display = 'block';
|
114 |
}
|
115 |
+
} else {
|
116 |
+
// documentPictureInPicture 自体がなければ #hide を表示
|
117 |
+
document.getElementById('hide').style.display = 'block';
|
118 |
}
|
119 |
});
|
120 |
</script>
|
|
|
|
|
121 |
</body>
|
122 |
</html>
|