Skip to content

Commit

Permalink
rough fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nakatai-0322 committed Jan 29, 2022
1 parent 051f49c commit d6f5df6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ <h1 class="text-center text-info my-4">アクセス環境表示ツール by Naka
</p>
<div class="text-center">
<code>
アクセス元ページ:&nbsp;<div id="accessfrom"></div>
解像度:&nbsp;<div id="resolution"></div>
ブラウザ:&nbsp;<div id="browser"></div>
OS:&nbsp;<div id="os"></div>
<div id="accessfrom"></div>
<div id="resolution"></div>
<div id="browser"></div>
<div id="os"></div>
</code>
</div>
<footer class="text-center">
Expand Down
17 changes: 12 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,17 @@ https://opensource.org/licenses/mit-license.php
//"platform.js"をインポート
import("./lib/platform.js")

//ページロード時に"out"に対し代入


//ページロード時に各部分に対し代入
window.onload = function onLoad() {
document.getElementById("accessfrom").innerHTML = location.href;
document.getElementById("resolution").innerHTML = screen.width + " x " + screen.height;
document.getElementById("browser").innerHTML = platform.version;
document.getElementById("os").innerHTML = platform.os;
const accessfrom = "アクセス元ページ: " + location.href;
const resolution = "解像度: " + screen.width + " x " + screen.height;
const browser = "ブラウザ: " + platform.version
const os = "OS: " + platform.os

document.getElementById("accessfrom").innerHTML = accessfrom;
document.getElementById("resolution").innerHTML = resolution;
document.getElementById("browser").innerHTML = browser;
document.getElementById("os").innerHTML = os;
}

0 comments on commit d6f5df6

Please sign in to comment.