Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ardublockly
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ardublockly
Commits
261e382c
Commit
261e382c
authored
Feb 11, 2015
by
carlosperate
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update arduino classic with warning alerts when the server component is not running.
parent
89a6a0f2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
114 additions
and
88 deletions
+114
-88
apps/arduino_classic/arduino_classic.js
apps/arduino_classic/arduino_classic.js
+74
-66
apps/arduino_classic/arduino_settings.js
apps/arduino_classic/arduino_settings.js
+39
-21
apps/arduino_classic/index.html
apps/arduino_classic/index.html
+1
-1
No files found.
apps/arduino_classic/arduino.js
→
apps/arduino_classic/arduino
_classic
.js
View file @
261e382c
...
...
@@ -11,51 +11,51 @@
/**
* Create a namespace for the application.
*/
var
Arduino
=
{};
var
Arduino
Classic
=
{};
/**
* List of tab names.
* @private
*/
Arduino
.
TABS_
=
[
'
blocks
'
,
'
arduino
'
,
'
xml
'
];
Arduino
Classic
.
TABS_
=
[
'
blocks
'
,
'
arduino
'
,
'
xml
'
];
Arduino
.
selected
=
'
blocks
'
;
Arduino
Classic
.
selected
=
'
blocks
'
;
/**
* Switch the visible pane when a tab is clicked.
* @param {string} clickedName Name of tab clicked.
*/
Arduino
.
tabClick
=
function
(
clickedName
)
{
Arduino
Classic
.
tabClick
=
function
(
clickedName
)
{
// If the XML tab was open, save and render the content.
if
(
document
.
getElementById
(
'
tab_xml
'
).
className
==
'
tabon
'
)
{
var
xmlTextarea
=
document
.
getElementById
(
'
content_xml
'
);
var
xmlText
=
xmlTextarea
.
value
;
Arduino
.
replaceBlocksfromXml
(
xmlText
);
Arduino
Classic
.
replaceBlocksfromXml
(
xmlText
);
}
// Deselect the button, and ensure side panel is hidden
Arduino
.
peekCode
(
false
);
Arduino
Classic
.
peekCode
(
false
);
// Deselect all tabs and hide all panes.
for
(
var
i
=
0
;
i
<
Arduino
.
TABS_
.
length
;
i
++
)
{
var
name
=
Arduino
.
TABS_
[
i
];
for
(
var
i
=
0
;
i
<
Arduino
Classic
.
TABS_
.
length
;
i
++
)
{
var
name
=
Arduino
Classic
.
TABS_
[
i
];
document
.
getElementById
(
'
tab_
'
+
name
).
className
=
'
taboff
'
;
document
.
getElementById
(
'
content_
'
+
name
).
style
.
display
=
'
none
'
;
}
// Select the active tab and panel
Arduino
.
selected
=
clickedName
;
Arduino
Classic
.
selected
=
clickedName
;
document
.
getElementById
(
'
tab_
'
+
clickedName
).
className
=
'
tabon
'
;
document
.
getElementById
(
'
content_
'
+
clickedName
).
style
.
display
=
'
block
'
;
Arduino
.
renderContent
();
Arduino
Classic
.
renderContent
();
Blockly
.
fireUiEvent
(
window
,
'
resize
'
);
};
/**
* Populate the currently selected panel with content generated from the blocks.
*/
Arduino
.
renderContent
=
function
()
{
var
content
=
document
.
getElementById
(
'
content_
'
+
Arduino
.
selected
);
Arduino
Classic
.
renderContent
=
function
()
{
var
content
=
document
.
getElementById
(
'
content_
'
+
Arduino
Classic
.
selected
);
// Initialize the panel
if
(
content
.
id
==
'
content_xml
'
)
{
var
xmlTextarea
=
document
.
getElementById
(
'
content_xml
'
);
...
...
@@ -77,18 +77,18 @@ Arduino.renderContent = function() {
/**
* Initialize Blockly. Called on page load.
*/
Arduino
.
init
=
function
()
{
Arduino
.
adjustViewport
();
Arduino
Classic
.
init
=
function
()
{
Arduino
Classic
.
adjustViewport
();
// Inject Blockly asynchronously into content_blocks
Arduino
.
injectBlockly
(
Arduino
Classic
.
injectBlockly
(
document
.
getElementById
(
'
content_blocks
'
),
'
arduino_toolbox.xml
'
);
// Create function to resize blockly if page layout changes
var
onresize
=
function
(
e
)
{
var
bBox
=
Arduino
.
getBBox_
(
document
.
getElementById
(
'
content_wrapper
'
));
for
(
var
i
=
0
;
i
<
Arduino
.
TABS_
.
length
;
i
++
)
{
var
el
=
document
.
getElementById
(
'
content_
'
+
Arduino
.
TABS_
[
i
]);
var
bBox
=
Arduino
Classic
.
getBBox_
(
document
.
getElementById
(
'
content_wrapper
'
));
for
(
var
i
=
0
;
i
<
Arduino
Classic
.
TABS_
.
length
;
i
++
)
{
var
el
=
document
.
getElementById
(
'
content_
'
+
Arduino
Classic
.
TABS_
[
i
]);
el
.
style
.
top
=
bBox
.
y
+
'
px
'
;
el
.
style
.
left
=
bBox
.
x
+
'
px
'
;
// Height and width need to be set, read back, then set again to
...
...
@@ -108,7 +108,7 @@ Arduino.init = function() {
// As Blockly is injected in parallel the binding only happens when done
var
bindBlocklyEventListener
=
function
()
{
if
(
Arduino
.
BLOCKLY_INJECTED
==
false
)
{
if
(
Arduino
Classic
.
BLOCKLY_INJECTED
==
false
)
{
setTimeout
(
bindBlocklyEventListener
,
50
);
}
else
{
window
.
addEventListener
(
'
resize
'
,
onresize
,
false
);
...
...
@@ -117,29 +117,37 @@ Arduino.init = function() {
};
bindBlocklyEventListener
();
Arduino
.
tabClick
(
Arduino
.
selected
);
Arduino
Classic
.
tabClick
(
ArduinoClassic
.
selected
);
// Binding buttons
Arduino
.
bindClick
(
'
peekCode
'
,
Arduino
.
peekCode
);
Arduino
.
bindClick
(
'
openButton
'
,
Arduino
.
loadXmlFile
);
Arduino
.
bindClick
(
'
saveButton
'
,
Arduino
.
saveXmlFile
);
Arduino
.
bindClick
(
'
trashButton
'
,
Arduino
.
discard
);
Arduino
.
bindClick
(
'
settingsButton
'
,
Arduino
.
openSettings
);
Arduino
.
bindClick
(
'
runButton
'
,
Arduino
.
loadToArduino
);
Arduino
Classic
.
bindClick
(
'
peekCode
'
,
ArduinoClassic
.
peekCode
);
Arduino
Classic
.
bindClick
(
'
openButton
'
,
ArduinoClassic
.
loadXmlFile
);
Arduino
Classic
.
bindClick
(
'
saveButton
'
,
ArduinoClassic
.
saveXmlFile
);
Arduino
Classic
.
bindClick
(
'
trashButton
'
,
ArduinoClassic
.
discard
);
Arduino
Classic
.
bindClick
(
'
settingsButton
'
,
ArduinoClassic
.
openSettings
);
Arduino
Classic
.
bindClick
(
'
runButton
'
,
ArduinoClassic
.
loadToArduino
);
// Binding tabs
for
(
var
i
=
0
;
i
<
Arduino
.
TABS_
.
length
;
i
++
)
{
var
name
=
Arduino
.
TABS_
[
i
];
Arduino
.
bindClick
(
'
tab_
'
+
name
,
function
(
name_
)
{
return
function
()
{
Arduino
.
tabClick
(
name_
);};}(
name
));
for
(
var
i
=
0
;
i
<
ArduinoClassic
.
TABS_
.
length
;
i
++
)
{
var
name
=
ArduinoClassic
.
TABS_
[
i
];
ArduinoClassic
.
bindClick
(
'
tab_
'
+
name
,
function
(
name_
)
{
return
function
()
{
ArduinoClassic
.
tabClick
(
name_
);};}(
name
));
}
// Check if not running locally (including developer's local network IP)
if
(
document
.
location
.
hostname
!=
"
localhost
"
&&
document
.
location
.
hostname
!=
"
192.168.0.7
"
)
{
alert
(
'
Ardublockly not running locally
\n\n
'
+
'
For Ardublockly to work correctly, the Ardublockly server must be
'
+
'
running locally on your computer
'
);
}
};
window
.
addEventListener
(
'
load
'
,
Arduino
.
init
);
window
.
addEventListener
(
'
load
'
,
Arduino
Classic
.
init
);
/**
* Fixes viewport for small screens.
*/
Arduino
.
adjustViewport
=
function
()
{
Arduino
Classic
.
adjustViewport
=
function
()
{
var
viewport
=
document
.
querySelector
(
'
meta[name="viewport"]
'
);
if
(
viewport
&&
screen
.
availWidth
<
725
)
{
viewport
.
setAttribute
(
'
content
'
,
...
...
@@ -150,7 +158,7 @@ Arduino.adjustViewport = function() {
/**
* Open a centered pop up with the server compiler settings.
*/
Arduino
.
openSettings
=
function
()
{
Arduino
Classic
.
openSettings
=
function
()
{
var
width
=
500
;
var
height
=
400
;
var
left
=
(
screen
.
width
/
2
)
-
(
width
/
2
);
...
...
@@ -164,16 +172,16 @@ Arduino.openSettings = function() {
/**
* Send the Arduino Code to the ArduServerCompiler to process.
*/
Arduino
.
loadToArduino
=
function
()
{
Arduino
Classic
.
loadToArduino
=
function
()
{
ArduServerCompiler
.
sendSketchToServer
(
Blockly
.
Arduino
.
workspaceToCode
(),
Arduino
.
loadToArduinoReturn
);
Arduino
Classic
.
loadToArduinoReturn
);
};
/**
* Send the Arduino Code to the ArduServerCompiler to process
*/
Arduino
.
loadToArduinoReturn
=
function
(
data_back_el
)
{
Arduino
Classic
.
loadToArduinoReturn
=
function
(
data_back_el
)
{
// edit modal with new content
var
modal
=
document
.
getElementById
(
'
modal_content
'
);
modal
.
innerHTML
=
''
;
...
...
@@ -185,50 +193,50 @@ Arduino.loadToArduinoReturn = function(data_back_el) {
/**
* Discard all blocks from the workspace.
*/
Arduino
.
discard
=
function
()
{
Arduino
Classic
.
discard
=
function
()
{
var
count
=
Blockly
.
mainWorkspace
.
getAllBlocks
().
length
;
var
message
=
'
Delete all
'
+
count
+
'
blocks?
'
;
if
(
count
<
2
||
window
.
confirm
(
message
))
{
Blockly
.
mainWorkspace
.
clear
();
window
.
location
.
hash
=
''
;
}
Arduino
.
renderContent
();
Arduino
Classic
.
renderContent
();
};
/**
* Store the state the code sidebar visibility
* @private
*/
Arduino
.
peek_code_
=
false
;
Arduino
Classic
.
peek_code_
=
false
;
/**
* Loads/unloads the side div with a code peek
* @param {boolean?} visible Optional argument, indicates the new visibility of
* the code preview.
*/
Arduino
.
peekCode
=
function
(
visible
)
{
Arduino
Classic
.
peekCode
=
function
(
visible
)
{
var
peek_code_button
=
document
.
getElementById
(
'
peekCode
'
);
var
code_peek_content
=
document
.
getElementById
(
'
arduino_code_peek
'
);
if
(
visible
==
true
)
{
Arduino
.
peek_code_
=
false
;
Arduino
Classic
.
peek_code_
=
false
;
}
else
if
(
visible
==
false
)
{
Arduino
.
peek_code_
=
true
;
Arduino
Classic
.
peek_code_
=
true
;
}
if
(
Arduino
.
peek_code_
==
false
)
{
Arduino
.
peek_code_
=
true
;
if
(
Arduino
Classic
.
peek_code_
==
false
)
{
Arduino
Classic
.
peek_code_
=
true
;
peek_code_button
.
className
=
"
button_text secondary
"
;
Arduino
.
sideContent
(
true
);
Arduino
Classic
.
sideContent
(
true
);
code_peek_content
.
style
.
display
=
'
inline-block
'
;
// Regenerate arduino code and ensure every click does as well
Arduino
.
renderArduinoPeekCode
();
Blockly
.
addChangeListener
(
Arduino
.
renderArduinoPeekCode
);
Arduino
Classic
.
renderArduinoPeekCode
();
Blockly
.
addChangeListener
(
Arduino
Classic
.
renderArduinoPeekCode
);
}
else
{
Arduino
.
peek_code_
=
false
;
Arduino
Classic
.
peek_code_
=
false
;
peek_code_button
.
className
=
"
button_text
"
;
code_peek_content
.
style
.
display
=
'
none
'
;
Arduino
.
sideContent
(
false
);
Arduino
Classic
.
sideContent
(
false
);
// Remove action listeners. TODO: track listener so that first time does not
// crashes
//Blockly.removeChangeListener(renderArduinoPeekCode);
...
...
@@ -240,13 +248,13 @@ Arduino.peekCode = function(visible) {
* @param {string} content_name Name of the content div
* @param {boolean} visible Indicated if the content should be shown or hidden
*/
Arduino
.
sideContent
=
function
(
visible
)
{
Arduino
Classic
.
sideContent
=
function
(
visible
)
{
var
side_content
=
document
.
getElementById
(
'
side_content
'
);
var
block_content
=
document
.
getElementById
(
'
content_blocks
'
);
// Deselect all tabs and hide all panes.
for
(
var
i
=
0
;
i
<
Arduino
.
TABS_
.
length
;
i
++
)
{
var
name
=
Arduino
.
TABS_
[
i
];
for
(
var
i
=
0
;
i
<
Arduino
Classic
.
TABS_
.
length
;
i
++
)
{
var
name
=
Arduino
Classic
.
TABS_
[
i
];
document
.
getElementById
(
'
tab_
'
+
name
).
className
=
'
taboff
'
;
document
.
getElementById
(
'
content_
'
+
name
).
style
.
display
=
'
none
'
;
}
...
...
@@ -262,18 +270,18 @@ Arduino.sideContent = function(visible) {
side_content
.
style
.
display
=
'
none
'
;
block_content
.
className
=
'
content content_blocks
'
;
// Select the active tab and panel
document
.
getElementById
(
'
tab_
'
+
Arduino
.
selected
).
className
=
'
tabon
'
;
document
.
getElementById
(
'
content_
'
+
Arduino
.
selected
).
style
.
display
=
'
block
'
;
document
.
getElementById
(
'
tab_
'
+
Arduino
Classic
.
selected
).
className
=
'
tabon
'
;
document
.
getElementById
(
'
content_
'
+
Arduino
Classic
.
selected
).
style
.
display
=
'
block
'
;
}
Blockly
.
fireUiEvent
(
window
,
'
resize
'
);
Arduino
.
renderContent
();
Arduino
Classic
.
renderContent
();
};
/**
* Updates the arduino code in the pre area based on the blocks
*/
Arduino
.
renderArduinoPeekCode
=
function
()
{
Arduino
Classic
.
renderArduinoPeekCode
=
function
()
{
var
code_peak_pre
=
document
.
getElementById
(
'
arduino_pre
'
);
code_peak_pre
.
textContent
=
Blockly
.
Arduino
.
workspaceToCode
();
if
(
typeof
prettyPrintOne
==
'
function
'
)
{
...
...
@@ -285,14 +293,14 @@ Arduino.renderArduinoPeekCode = function() {
* Public variable that indicates if Blockly has been injected.
* @type {!boolean}
*/
Arduino
.
BLOCKLY_INJECTED
=
false
;
Arduino
Classic
.
BLOCKLY_INJECTED
=
false
;
/**
* Injects Blockly into a given text area. Reads the toolbox from an XMl file.
* @param {!Element} el Element to inject Blockly into.
* @param {!string} toolbox_path String containing the toolbox XML file path.
*/
Arduino
.
injectBlockly
=
function
(
blockly_el
,
toolbox_path
)
{
Arduino
Classic
.
injectBlockly
=
function
(
blockly_el
,
toolbox_path
)
{
// Create a an XML HTTP request
var
request
;
try
{
// Firefox, Chrome, IE7+, Opera, Safari
...
...
@@ -325,7 +333,7 @@ Arduino.injectBlockly = function(blockly_el, toolbox_path) {
scrollbars
:
true
,
toolbox
:
request
.
responseText
,
trashcan
:
true
});
Arduino
.
BLOCKLY_INJECTED
=
true
;
Arduino
Classic
.
BLOCKLY_INJECTED
=
true
;
}
}
...
...
@@ -336,15 +344,15 @@ Arduino.injectBlockly = function(blockly_el, toolbox_path) {
* Loads an XML file from the users file system and adds the blocks into the
* Blockly workspace.
*/
Arduino
.
loadXmlFile
=
function
()
{
Arduino
Classic
.
loadXmlFile
=
function
()
{
// Create event listener function
var
parseInputXMLfile
=
function
(
e
)
{
var
files
=
e
.
target
.
files
;
var
reader
=
new
FileReader
();
reader
.
onload
=
function
()
{
var
success
=
Arduino
.
replaceBlocksfromXml
(
reader
.
result
);
var
success
=
Arduino
Classic
.
replaceBlocksfromXml
(
reader
.
result
);
if
(
success
)
{
Arduino
.
renderContent
();
Arduino
Classic
.
renderContent
();
}
else
{
alert
(
'
Invalid XML!
\n
The XML file was not successfully parsed into
'
+
'
blocks. Please review the XML code and try again.
'
);
...
...
@@ -372,7 +380,7 @@ Arduino.loadXmlFile = function() {
* @param {!string} blocks_xml String of XML code for the blocks.
* @return {!boolean} Indicates if the XML into blocks parse was successful.
*/
Arduino
.
replaceBlocksfromXml
=
function
(
blocks_xml
)
{
Arduino
Classic
.
replaceBlocksfromXml
=
function
(
blocks_xml
)
{
var
xmlDom
=
null
;
var
success
=
true
;
try
{
...
...
@@ -398,7 +406,7 @@ Arduino.replaceBlocksfromXml = function(blocks_xml) {
* Creates an XML file containing the blocks from the Blockly workspace and
* prompts the users to save it into their local file system.
*/
Arduino
.
saveXmlFile
=
function
()
{
Arduino
Classic
.
saveXmlFile
=
function
()
{
// Generate XML
var
xmlDom
=
Blockly
.
Xml
.
workspaceToDom
(
Blockly
.
mainWorkspace
);
var
xmlText
=
Blockly
.
Xml
.
domToPrettyText
(
xmlDom
);
...
...
@@ -416,7 +424,7 @@ Arduino.saveXmlFile = function() {
* @param {!Element|string} el Button element or ID thereof.
* @param {!Function} func Event handler to bind.
*/
Arduino
.
bindClick
=
function
(
el
,
func
)
{
Arduino
Classic
.
bindClick
=
function
(
el
,
func
)
{
if
(
typeof
el
==
'
string
'
)
{
el
=
document
.
getElementById
(
el
);
}
...
...
@@ -436,7 +444,7 @@ Arduino.bindClick = function(el, func) {
* @return {!Object} Contains height, width, x, and y properties.
* @private
*/
Arduino
.
getBBox_
=
function
(
element
)
{
Arduino
Classic
.
getBBox_
=
function
(
element
)
{
var
height
=
element
.
offsetHeight
;
var
width
=
element
.
offsetWidth
;
var
x
=
0
;
...
...
apps/arduino_classic/arduino_settings.js
View file @
261e382c
...
...
@@ -34,6 +34,14 @@ window.addEventListener('load', function() {
ArduServerCompiler
.
requestNewSketchLocation
(
ArduinoSettings
.
setSketchLocationHtml
);
});
// Check if not running locally (including developer's local network IP)
if
(
document
.
location
.
hostname
!=
"
localhost
"
&&
document
.
location
.
hostname
!=
"
192.168.0.7
"
)
{
alert
(
'
Ardublockly not running locally
\n\n
'
+
'
For Ardublockly to work correctly, the Ardublockly server must be
'
+
'
running locally on your computer
'
);
}
});
/**
...
...
@@ -42,9 +50,11 @@ window.addEventListener('load', function() {
* DOM. Should contain a complete input text element.
*/
ArduinoSettings
.
setCompilerLocationHtml
=
function
(
new_el
)
{
var
comp_loc_ip
=
document
.
getElementById
(
'
settings_compiler_location
'
)
if
(
comp_loc_ip
!=
null
)
{
comp_loc_ip
.
value
=
new_el
.
value
;
if
(
new_el
!=
null
)
{
var
comp_loc_ip
=
document
.
getElementById
(
'
settings_compiler_location
'
)
if
(
comp_loc_ip
!=
null
)
{
comp_loc_ip
.
value
=
new_el
.
value
;
}
}
};
...
...
@@ -54,9 +64,11 @@ ArduinoSettings.setCompilerLocationHtml = function(new_el) {
* DOM. Should contain a complete input text element.
*/
ArduinoSettings
.
setSketchLocationHtml
=
function
(
new_el
)
{
var
sketch_loc_ip
=
document
.
getElementById
(
'
settings_sketch_location
'
)
if
(
sketch_loc_ip
!=
null
)
{
sketch_loc_ip
.
value
=
new_el
.
value
;
if
(
new_el
!=
null
)
{
var
sketch_loc_ip
=
document
.
getElementById
(
'
settings_sketch_location
'
)
if
(
sketch_loc_ip
!=
null
)
{
sketch_loc_ip
.
value
=
new_el
.
value
;
}
}
};
...
...
@@ -67,11 +79,13 @@ ArduinoSettings.setSketchLocationHtml = function(new_el) {
* DOM. Should contain a complete select element.
*/
ArduinoSettings
.
setArduinoBoardsHtml
=
function
(
new_el
)
{
var
board_dropdown
=
document
.
getElementById
(
'
board
'
)
if
(
board_dropdown
!=
null
)
{
new_el
.
id
=
'
board
'
;
new_el
.
onchange
=
ArduinoSettings
.
setBoard
;
board_dropdown
.
parentNode
.
replaceChild
(
new_el
,
board_dropdown
);
if
(
new_el
!=
null
)
{
var
board_dropdown
=
document
.
getElementById
(
'
board
'
)
if
(
board_dropdown
!=
null
)
{
new_el
.
id
=
'
board
'
;
new_el
.
onchange
=
ArduinoSettings
.
setBoard
;
board_dropdown
.
parentNode
.
replaceChild
(
new_el
,
board_dropdown
);
}
}
};
...
...
@@ -93,11 +107,13 @@ ArduinoSettings.setBoard = function() {
* DOM. Should contain a complete select element.
*/
ArduinoSettings
.
setSerialPortsHtml
=
function
(
new_el
)
{
var
serial_dropdown
=
document
.
getElementById
(
'
serial_port
'
)
if
(
serial_dropdown
!=
null
)
{
new_el
.
id
=
'
serial_port
'
;
new_el
.
onchange
=
ArduinoSettings
.
setSerial
;
serial_dropdown
.
parentNode
.
replaceChild
(
new_el
,
serial_dropdown
);
if
(
new_el
!=
null
)
{
var
serial_dropdown
=
document
.
getElementById
(
'
serial_port
'
)
if
(
serial_dropdown
!=
null
)
{
new_el
.
id
=
'
serial_port
'
;
new_el
.
onchange
=
ArduinoSettings
.
setSerial
;
serial_dropdown
.
parentNode
.
replaceChild
(
new_el
,
serial_dropdown
);
}
}
};
...
...
@@ -119,11 +135,13 @@ ArduinoSettings.setSerial = function() {
* DOM. Should contain a complete select element.
*/
ArduinoSettings
.
setIdeHtml
=
function
(
new_el
)
{
var
ide_dropdown
=
document
.
getElementById
(
'
ide_settings
'
)
if
(
ide_dropdown
!=
null
)
{
new_el
.
id
=
'
ide_settings
'
;
new_el
.
onchange
=
ArduinoSettings
.
setIdeSettings
;
ide_dropdown
.
parentNode
.
replaceChild
(
new_el
,
ide_dropdown
);
if
(
new_el
!=
null
)
{
var
ide_dropdown
=
document
.
getElementById
(
'
ide_settings
'
)
if
(
ide_dropdown
!=
null
)
{
new_el
.
id
=
'
ide_settings
'
;
new_el
.
onchange
=
ArduinoSettings
.
setIdeSettings
;
ide_dropdown
.
parentNode
.
replaceChild
(
new_el
,
ide_dropdown
);
}
}
};
...
...
apps/arduino_classic/index.html
View file @
261e382c
...
...
@@ -118,6 +118,6 @@
</div>
<!-- Webapp js -->
<script
src=
"arduino.js"
></script>
<script
src=
"arduino
_classic
.js"
></script>
</body>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment