Skip to content
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
2 changes: 1 addition & 1 deletion src/class/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Entry.Container = class Container {
.bindOnClick(() => {
Entry.dispatchEvent('openSpriteManager');
});
addButton.innerHTML = Lang.Workspace.add_object;
addButton.textContent = Lang.Workspace.add_object;

const ulWrapper = Entry.createElement('div');
this._view.appendChild(ulWrapper);
Expand Down
28 changes: 14 additions & 14 deletions src/class/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Entry.Engine = class Engine {
this.blur();
})
.appendTo(this.buttonWrapper);
this.addButton.innerHTML = Lang.Workspace.add_object;
this.addButton.textContent = Lang.Workspace.add_object;
if (!Entry.objectAddable) {
this.addButton.addClass('entryRemove');
}
Expand All @@ -151,7 +151,7 @@ Entry.Engine = class Engine {
.addClass('entryRunButtonWorkspace_w')
.bindOnClick(() => Entry.do('toggleRun', 'runButton'))
.appendTo(this.buttonWrapper);
this.runButton.innerHTML = Lang.Workspace.run;
this.runButton.textContent = Lang.Workspace.run;

this.runButton2 = Entry.createElement('button')
.addClass('entryEngineButtonWorkspace_w')
Expand Down Expand Up @@ -185,7 +185,7 @@ Entry.Engine = class Engine {
.addClass('entryRemove')
.bindOnClick(() => Entry.do('toggleStop', 'stopButton'))
.appendTo(this.buttonWrapper);
this.stopButton.innerHTML = Lang.Workspace.stop;
this.stopButton.textContent = Lang.Workspace.stop;

this.stopButton2 = Entry.createElement('button')
.addClass('entryEngineButtonWorkspace_w')
Expand All @@ -196,7 +196,7 @@ Entry.Engine = class Engine {
Entry.engine.toggleStop();
})
.appendTo(this.buttonWrapper);
this.stopButton2.innerHTML = Lang.Workspace.stop;
this.stopButton2.textContent = Lang.Workspace.stop;
} else if (option == 'minimize') {
/** @type {!Element} */
this.view_ = controlView;
Expand Down Expand Up @@ -228,15 +228,15 @@ Entry.Engine = class Engine {
this.stopButton.addClass('entryEngineButtonMinimize');
this.stopButton.addClass('entryStopButtonMinimize');
this.stopButton.addClass('entryRemove');
this.stopButton.innerHTML = Lang.Workspace.stop;
this.stopButton.textContent = Lang.Workspace.stop;
this.view_.appendChild(this.stopButton);
this.stopButton.bindOnClick(function(e) {
this.blur();
Entry.engine.toggleStop();
});

this.pauseButton = Entry.createElement('button');
this.pauseButton.innerHTML = Lang.Workspace.pause;
this.pauseButton.textContent = Lang.Workspace.pause;
this.pauseButton.addClass('entryEngineButtonMinimize');
this.pauseButton.addClass('entryPauseButtonMinimize');
this.pauseButton.addClass('entryRemove');
Expand Down Expand Up @@ -314,7 +314,7 @@ Entry.Engine = class Engine {
if (Entry.objectAddable) {
this.runButton.addClass('small');
}
this.runButton.innerHTML = Lang.Workspace.run;
this.runButton.textContent = Lang.Workspace.run;

this.footerView_.appendChild(this.runButton);
this.runButton.bindOnClick((e) => {
Expand All @@ -330,7 +330,7 @@ Entry.Engine = class Engine {
if (Entry.objectAddable) {
this.stopButton.addClass('small');
}
this.stopButton.innerHTML = Lang.Workspace.stop;
this.stopButton.textContent = Lang.Workspace.stop;

this.footerView_.appendChild(this.stopButton);
this.stopButton.bindOnClick((e) => {
Expand Down Expand Up @@ -368,7 +368,7 @@ Entry.Engine = class Engine {
const audioShadeText = Entry.createElement('div', 'audioShadeText').addClass(
'audioShadeText'
);
audioShadeText.innerHTML = Lang.Msgs.ai_utilize_audio_listening;
audioShadeText.textContent = Lang.Msgs.ai_utilize_audio_listening;
this.audioShadePanel_.appendChild(audioShadeText);
this.minimizedView_ = document.querySelector('#entryCanvasWrapper');
if (this.view_.classList[0] === 'entryEngine') {
Expand Down Expand Up @@ -490,7 +490,7 @@ Entry.Engine = class Engine {
this.view_.insertBefore(speedBox, Entry.stage.canvas.canvas);

this.speedLabel_ = Entry.createElement('div', 'entrySpeedLabelWorkspace');
this.speedLabel_.innerHTML = Lang.Workspace.speed;
this.speedLabel_.textContent = Lang.Workspace.speed;
speedBox.appendChild(this.speedLabel_);

this.speedProgress_ = Entry.createElement('table', 'entrySpeedProgressWorkspace');
Expand Down Expand Up @@ -855,14 +855,14 @@ Entry.Engine = class Engine {
setPauseButton() {
if (this.state === EntryEngineState.pause) {
if (this.pauseButton) {
this.pauseButton.innerHTML = Lang.Workspace.restart;
this.pauseButton.textContent = Lang.Workspace.restart;
if (this.option !== 'minimize') {
this.pauseButton.removeClass('entryPauseButtonWorkspace_w');
this.pauseButton.addClass('entryRestartButtonWorkspace_w');
}
}
if (this.pauseButtonFull) {
this.pauseButtonFull.innerHTML = Lang.Workspace.restart;
this.pauseButtonFull.textContent = Lang.Workspace.restart;
if (this.option !== 'minimize') {
// workspace && buttonWrapper check
if (this.buttonWrapper) {
Expand All @@ -875,14 +875,14 @@ Entry.Engine = class Engine {
}
} else {
if (this.pauseButton) {
this.pauseButton.innerHTML = Lang.Workspace.pause;
this.pauseButton.textContent = Lang.Workspace.pause;
if (this.option !== 'minimize') {
this.pauseButton.addClass('entryPauseButtonWorkspace_w');
this.pauseButton.removeClass('entryRestartButtonWorkspace_w');
}
}
if (this.pauseButtonFull) {
this.pauseButtonFull.innerHTML = Lang.Workspace.pause;
this.pauseButtonFull.textContent = Lang.Workspace.pause;
if (this.option !== 'minimize') {
this.pauseButtonFull.addClass('entryPauseButtonWorkspace_full');
this.pauseButtonFull.removeClass('entryRestartButtonWorkspace_full');
Expand Down
24 changes: 12 additions & 12 deletions src/class/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class EntryBlockHelper {

const commandTitle = Entry.createElement('div');
commandTitle.addClass('entryBlockHelperTitle textModeElem');
commandTitle.innerHTML = 'Command';
commandTitle.textContent = 'Command';
blockHelperContent.appendChild(commandTitle);

blockHelperContent.addClass('entryBlockHelperIntro');
Expand All @@ -49,7 +49,7 @@ class EntryBlockHelper {

const descTitle = Entry.createElement('div');
descTitle.addClass('entryBlockHelperTitle textModeElem');
descTitle.innerHTML = 'Explanation';
descTitle.textContent = 'Explanation';
blockHelperContent.appendChild(descTitle);

const blockHelperDescription = Entry.createElement(
Expand All @@ -58,12 +58,12 @@ class EntryBlockHelper {
);
blockHelperDescription.addClass('entryBlockHelperContent selectAble');
helper.blockHelperContent_.appendChild(blockHelperDescription);
blockHelperDescription.innerHTML = Lang.Helper.Block_click_msg;
blockHelperDescription.textContent = Lang.Helper.Block_click_msg;
this.blockHelperDescription_ = blockHelperDescription;

const elementsTitle = Entry.createElement('div');
elementsTitle.addClass('entryBlockHelperTitle textModeElem');
elementsTitle.innerHTML = 'Element';
elementsTitle.textContent = 'Element';
blockHelperContent.appendChild(elementsTitle);
this._elementsTitle = elementsTitle;

Expand All @@ -75,7 +75,7 @@ class EntryBlockHelper {
if (typeof CodeMirror !== 'undefined') {
const codeMirrorTitle = Entry.createElement('div');
codeMirrorTitle.addClass('entryBlockHelperTitle textModeElem');
codeMirrorTitle.innerHTML = 'Example Code';
codeMirrorTitle.textContent = 'Example Code';
blockHelperContent.appendChild(codeMirrorTitle);

const codeMirrorView = Entry.createElement(
Expand All @@ -101,7 +101,7 @@ class EntryBlockHelper {

const codeMirrorDescTitle = Entry.createElement('div');
codeMirrorDescTitle.addClass('entryBlockHelperTitle textModeElem');
codeMirrorDescTitle.innerHTML = 'Example Explanation';
codeMirrorDescTitle.textContent = 'Example Explanation';
blockHelperContent.appendChild(codeMirrorDescTitle);

this._codeMirrorDesc = Entry.createElement('div');
Expand Down Expand Up @@ -152,10 +152,10 @@ class EntryBlockHelper {

if (this.workspace.getMode() === Entry.Workspace.MODE_VIMBOARD) {
this._contentView.addClass('textMode');
this.blockHelperDescription_.innerHTML = Lang.PythonHelper[`${type}_desc`];
this.blockHelperDescription_.textContent = Lang.PythonHelper[`${type}_desc`];

let elements = Lang.PythonHelper[`${type}_elements`];
this._elementsContainer.innerHTML = '';
this._elementsContainer.textContent = '';
if (elements) {
this._elementsTitle.removeClass('entryRemove');
elements = elements.split('%next');
Expand All @@ -166,12 +166,12 @@ class EntryBlockHelper {
box.addClass('entryBlockHelperElementsContainer');
const left = Entry.createElement('div');

left.innerHTML = contents[0];
left.textContent = contents[0];
left.addClass('elementLeft');

const right = Entry.createElement('div');
right.addClass('elementRight');
right.innerHTML = contents[1];
right.textContent = contents[1];
box.appendChild(left);
box.appendChild(right);
this._elementsContainer.appendChild(box);
Expand All @@ -180,15 +180,15 @@ class EntryBlockHelper {
} else {
this._elementsTitle.addClass('entryRemove');
}
this._codeMirrorDesc.innerHTML = Lang.PythonHelper[`${type}_exampleDesc`];
this._codeMirrorDesc.textContent = Lang.PythonHelper[`${type}_exampleDesc`];

const exampleCode = Lang.PythonHelper[`${type}_exampleCode`];
this._codeMirror.setValue(exampleCode);
this.codeMirror.refresh();
def = Entry.block[type].pyHelpDef || def;
} else {
this._contentView.removeClass('textMode');
this.blockHelperDescription_.innerHTML = description;
this.blockHelperDescription_.textContent = description;
}

code.createThread([def]);
Expand Down
14 changes: 7 additions & 7 deletions src/class/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ Entry.EntryObject = class {
'entryObjectRotateMethodLabelWorkspace'
);
rotationMethodWrapper.appendChild(rotateMethodLabelView);
rotateMethodLabelView.innerHTML = `${Lang.Workspace.rotate_method}`;
rotateMethodLabelView.textContent = `${Lang.Workspace.rotate_method}`;

const rotateModeAView = Entry.createElement('span').addClass(
'entryObjectRotateModeWorkspace entryObjectRotateModeAWorkspace'
Expand Down Expand Up @@ -962,7 +962,7 @@ Entry.EntryObject = class {
'entryObjectRotateWorkspaceWrapper'
);
const rotateSpan = Entry.createElement('span').addClass('entryObjectRotateSpanWorkspace');
rotateSpan.innerHTML = `${Lang.Workspace.rotation}`;
rotateSpan.textContent = `${Lang.Workspace.rotation}`;
const RotateDegCoordi = Entry.createElement('span').addClass(
'entryObjectCoordinateSpanWorkspace degree'
);
Expand Down Expand Up @@ -1001,7 +1001,7 @@ Entry.EntryObject = class {
const directionSpan = Entry.createElement('span').addClass(
'entryObjectDirectionSpanWorkspace'
);
directionSpan.innerHTML = `${Lang.Workspace.direction}`;
directionSpan.textContent = `${Lang.Workspace.direction}`;
const DirectionDegCoordi = Entry.createElement('span').addClass(
'entryObjectCoordinateSpanWorkspace degree'
);
Expand Down Expand Up @@ -1054,7 +1054,7 @@ Entry.EntryObject = class {
'entryObjectCoordinateWorkspaceWrapper'
);
const xCoordi = Entry.createElement('span').addClass('entryObjectCoordinateSpanWorkspace');
xCoordi.innerHTML = 'X';
xCoordi.textContent = 'X';
const xInput = Entry.createElement('input').addClass('entryObjectCoordinateInputWorkspace');
xInput.setAttribute('type', 'text');
xInput.onkeypress = this.editObjectValueWhenEnterPress;
Expand All @@ -1077,11 +1077,11 @@ Entry.EntryObject = class {
'entryObjectCoordinateWorkspaceWrapper'
);
const yCoordi = Entry.createElement('span').addClass('entryObjectCoordinateSpanWorkspace');
yCoordi.innerHTML = 'Y';
yCoordi.textContent = 'Y';
const PerCoordi = Entry.createElement('span').addClass(
'entryObjectCoordinateSpanWorkspace'
);
PerCoordi.innerHTML = '%';
PerCoordi.textContent = '%';
const yInput = Entry.createElement('input').addClass(
'entryObjectCoordinateInputWorkspace entryObjectCoordinateInputWorkspace_right'
);
Expand All @@ -1105,7 +1105,7 @@ Entry.EntryObject = class {
'entryObjectCoordinateSizeWrapper'
);
const sizeSpan = Entry.createElement('span').addClass('entryObjectCoordinateSizeWorkspace');
sizeSpan.innerHTML = `${Lang.Workspace.Size}`;
sizeSpan.textContent = `${Lang.Workspace.Size}`;
const sizeInput = Entry.createElement('input').addClass(
'entryObjectCoordinateInputWorkspace',
'entryObjectCoordinateInputWorkspace_size'
Expand Down
Loading