Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

プロトタイプ汚染脆弱性の修正 #96 #97

Merged
merged 1 commit into from
Mar 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,20 @@ Edition: ORIZIN Agent HTML

## リリース

### [v5.0.142.9dev-Eagle] - 2021-03-07
### [v5.0.142.9dev-Eagle] - 2021-03-08

#### 変更

- HTMLファイルに直書きとなっていたCSSとJavaScriptを別ファイルに切り出しました [#93](https://github.com/Robot-Inventor/ORIZIN-Agent-HTML/issues/93)

#### セキュリティー

- プロトタイプ汚染脆弱性を修正しました [#96](https://github.com/Robot-Inventor/ORIZIN-Agent-HTML/issues/96)

#### 修正

- リファクタリングを行いました

### [v5.0.141.8-Eagle] - 2021-03-07

#### 追加
Expand Down
2 changes: 1 addition & 1 deletion resource/information.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ Series Name:ORIZIN Agent
Edition:ORIZIN Agent HTML
Version:v5.0.142.9dev
Code Name:Eagle
Date:2021-03-07 JST
Date:2021-03-08 JST
4 changes: 2 additions & 2 deletions resource/javascript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function add_chat(content, is_user = false, is_youtube = false) {
}

function chat_and_speak(chat_content, speak_content = "") {
if (arguments[1] === undefined) {
if (speak_content === undefined) {
speak_content = chat_content;
}
add_chat(chat_content);
Expand Down Expand Up @@ -132,7 +132,7 @@ async function read_setting() {
}

function listening_status(status = false) {
if (arguments[0] !== undefined) {
if (status !== undefined) {
if (status) {
document.getElementById("listening_message").style.opacity = 1;
document.getElementById("start_recognition").classList.add("listening");
Expand Down
20 changes: 14 additions & 6 deletions resource/javascript/timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,36 @@ function update_time(time) {

function timer_status() {
if (is_stopped) {
return "stopped"
return "stopped";
} else {
return "started"
return "started";
}
}

function reset_status() {
const result = is_reseted;
is_reseted = false;
return result
return result;
}

function set_time() {
update_time(hour + ":" + minute + ":" + second);
}

window.addEventListener("load", () => {
let settings = new Object;
let settings = {};
settings.h = 0;
settings.m = 0;
settings.s = 0;

const pair = location.search.substring(1).split("&");
for (var i = 0; pair[i]; i++) {
var kv = pair[i].split("=");
settings[kv[0]] = kv[1];
const kv = pair[i].split("=");

const name = kv[0];
const value = settings.hasOwnProperty(name) ? kv[1] : null;

settings[name] = value;
}
hour = settings.h;
minute = settings.m;
Expand Down