Skip to content

Commit

Permalink
style: revert 3ds + wiiu files to use var
Browse files Browse the repository at this point in the history
  • Loading branch information
binaryoverload committed Jan 16, 2025
1 parent e36f2fb commit c0fecbb
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 82 deletions.
14 changes: 7 additions & 7 deletions src/webfiles/ctr/js/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ if (typeof cave === 'undefined') {
* @param errorCode
*/
error_callErrorViewer: function (errorCode) {
const fakeMessage = 'Message for error code ' + errorCode;
var fakeMessage = 'Message for error code ' + errorCode;
alert(errorCode + '\n\n' + fakeMessage);
},
/**
Expand Down Expand Up @@ -142,7 +142,7 @@ if (typeof cave === 'undefined') {
console.log('cave.ls_setItem()');
// string でないと実機でエラー出るので挙動を合わせる
// If it is not string, an error will occur on the actual machine, so match the behavior
for (let i = 0; i < 2; i++) {
for (var i = 0; i < 2; i++) {
if (typeof arguments[i] !== 'string') {
console.error('Argument ' + i + ' should be string');
console.error('JavaScript Extension error. Arguments Count or Argument Type is not mutch. Or , too big arguments.');
Expand Down Expand Up @@ -229,7 +229,7 @@ if (typeof cave === 'undefined') {
*/
ls_setCanUseCachedServiceToken: function (can_use) {
console.log('cave.ls_setCanUseCachedServiceToken');
const flag = can_use ? '1' : '0';
var flag = can_use ? '1' : '0';
sessionStorage.setItem('custk', flag);
},
/**
Expand Down Expand Up @@ -282,7 +282,7 @@ if (typeof cave === 'undefined') {
*/
dialog_twoButton: function (title, message, buttonL_text, buttonR_text) {
console.log('cave.dialog_twoButton()');
const result = confirm('タイトル:' + title + '\n' + 'メッセージ:' + message + '\n\n[ ' + buttonL_text + ' (Cancel) ] [ ' + buttonR_text + ' (OK) ]');
var result = confirm('タイトル:' + title + '\n' + 'メッセージ:' + message + '\n\n[ ' + buttonL_text + ' (Cancel) ] [ ' + buttonR_text + ' (OK) ]');
return result ? 1 : 0;
},

Expand Down Expand Up @@ -526,7 +526,7 @@ if (typeof cave === 'undefined') {

// テスト等でスクショの有無を固定したい場合にクッキーで指定できるようにする, 実機ではこの挙動は存在しない
// If you want to fix the presence or absence of screenshots in tests, etc., make it possible to specify with cookies, this behavior does not exist on the actual device
const force = Olv.Cookie.get('force_screenshot_for_test');
var force = Olv.Cookie.get('force_screenshot_for_test');
if (force === 'true') {
return true;
}
Expand Down Expand Up @@ -569,7 +569,7 @@ if (typeof cave === 'undefined') {
},
lls_getPath: function (key) {
console.log('cave.getPath(' + key + ')');
const value = localStorage.getItem(key);
var value = localStorage.getItem(key);
if (value == 0) {
return '/img/dummy-image/screenshot-dummy-3ds-low.jpeg';
} else {
Expand Down Expand Up @@ -686,7 +686,7 @@ if (typeof cave === 'undefined') {
},
convertTimeToString: function (unixTime) {
console.log('cave.convertTimeToString(' + unixTime + ')');
const date = new Date(unixTime * 1000);
var date = new Date(unixTime * 1000);
return date.getFullYear() + '-' + this._toDoubleDigits(date.getMonth() + 1) + '-' + this._toDoubleDigits(date.getDate()) +
' ' + this._toDoubleDigits(date.getHours()) + ':' + this._toDoubleDigits(date.getMinutes()) + ':' + this._toDoubleDigits(date.getSeconds());
},
Expand Down
18 changes: 9 additions & 9 deletions src/webfiles/ctr/js/pjax.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ var Pjax = {
return this;
},
refresh: function () {
const els = document.querySelectorAll(this.elements);
var els = document.querySelectorAll(this.elements);
if (!els) {
return;
}
console.log(this.elements);
console.log(els);
for (let i = 0; i < els.length; i++) {
for (var i = 0; i < els.length; i++) {
els[i].addEventListener('click', function (e) {
pageWrapper(e, this);
});
Expand All @@ -44,7 +44,7 @@ var Pjax = {
console.log(url);
},
get: function (url, callback) {
const xhttp = new XMLHttpRequest();
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (this.readyState === 4) {
document.dispatchEvent(Pjax.events.PjaxLoaded);
Expand All @@ -56,13 +56,13 @@ var Pjax = {
xhttp.send();
},
parseDom: function (data) {
const response = data.responseText;
var response = data.responseText;
if (response && data.status === 200) {
const html = document.implementation.createHTMLDocument('');
var html = document.implementation.createHTMLDocument('');
html.documentElement.innerHTML = response;
for (let i = 0; i < Pjax.selectors.length; i++) {
const newElement = html.querySelector(Pjax.selectors[i]);
const oldElement = document.querySelector(Pjax.selectors[i]);
for (var i = 0; i < Pjax.selectors.length; i++) {
var newElement = html.querySelector(Pjax.selectors[i]);
var oldElement = document.querySelector(Pjax.selectors[i]);
if (!newElement || !oldElement) {
continue;
}
Expand All @@ -81,7 +81,7 @@ var Pjax = {
if (!this.canGoBack()) {
return;
}
const url = this.history.pop();
var url = this.history.pop();
this.loadUrl(url, true);
}
};
Expand Down
12 changes: 6 additions & 6 deletions src/webfiles/portal/js/debug.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c0fecbb

Please sign in to comment.