Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
nerrons
purr-data
Commits
c3bc6934
Commit
c3bc6934
authored
Feb 25, 2016
by
Jonathan Wilkes
Browse files
fix problems discovered with jslint
parent
59dd8049
Changes
4
Hide whitespace changes
Inline
Side-by-side
pd/nw/dialog_gatom.html
View file @
c3bc6934
...
@@ -146,7 +146,7 @@
...
@@ -146,7 +146,7 @@
<script>
<script>
"
use strict
"
;
"
use strict
"
;
var
gui
=
require
(
"
nw.gui
"
);
var
gui
=
require
(
"
nw.gui
"
);
var
pdgui
=
require
(
"
./pdgui.js
"
);
var
pdgui
=
require
(
"
./pdgui.js
"
);
// For translations
// For translations
...
@@ -197,7 +197,7 @@ function update_attr(elem) {
...
@@ -197,7 +197,7 @@ function update_attr(elem) {
function
send_params
(
attrs
,
create_undo_point
)
{
function
send_params
(
attrs
,
create_undo_point
)
{
//pdgui.post("we're applying gatom changes!");
//pdgui.post("we're applying gatom changes!");
pdgui
.
pdsend
(
pd_object_callback
,
"
param
"
,
pdgui
.
pdsend
(
pd_object_callback
,
"
param
"
,
+
attrs
.
width
,
+
attrs
.
width
,
+
attrs
.
draglo
,
+
attrs
.
draglo
,
+
attrs
.
draghi
,
+
attrs
.
draghi
,
...
...
pd/nw/dialog_iemgui.html
View file @
c3bc6934
...
@@ -327,7 +327,7 @@
...
@@ -327,7 +327,7 @@
<script>
<script>
"
use strict
"
;
"
use strict
"
;
var
gui
=
require
(
"
nw.gui
"
);
var
gui
=
require
(
"
nw.gui
"
);
var
pdgui
=
require
(
"
./pdgui.js
"
);
var
pdgui
=
require
(
"
./pdgui.js
"
);
// For translations
// For translations
...
@@ -346,9 +346,10 @@ function substitute_space(arg) {
...
@@ -346,9 +346,10 @@ function substitute_space(arg) {
}
}
function
strip_problem_chars
(
arg
)
{
function
strip_problem_chars
(
arg
)
{
var
problem_chars
=
[
"
;
"
,
"
,
"
,
"
{
"
,
"
}
"
,
"
\\
"
];
var
problem_chars
=
[
"
;
"
,
"
,
"
,
"
{
"
,
"
}
"
,
"
\\
"
],
var
ret
=
arg
;
ret
=
arg
,
for
(
var
i
=
0
;
i
<
problem_chars
.
length
;
i
++
)
{
i
;
for
(
i
=
0
;
i
<
problem_chars
.
length
;
i
++
)
{
ret
=
ret
.
split
(
"
;
"
).
join
(
""
);
ret
=
ret
.
split
(
"
;
"
).
join
(
""
);
}
}
return
ret
;
return
ret
;
...
...
pd/nw/dialog_prefs.html
View file @
c3bc6934
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
</div>
</div>
<script>
<script>
"
use strict
"
;
"
use strict
"
;
var
gui
=
require
(
"
nw.gui
"
);
var
gui
=
require
(
"
nw.gui
"
);
var
pdgui
=
require
(
"
./pdgui.js
"
);
var
pdgui
=
require
(
"
./pdgui.js
"
);
// For translations
// For translations
...
@@ -451,7 +451,7 @@ function populate_devs(type, attrs) {
...
@@ -451,7 +451,7 @@ function populate_devs(type, attrs) {
elem
.
appendChild
(
opt
);
elem
.
appendChild
(
opt
);
for
(
j
=
0
;
j
<
devs
.
length
;
j
++
)
{
for
(
j
=
0
;
j
<
devs
.
length
;
j
++
)
{
opt
=
document
.
createElement
(
"
option
"
);
opt
=
document
.
createElement
(
"
option
"
);
opt
.
value
=
j
;
opt
.
value
=
j
;
opt
.
textContent
=
devs
[
j
];
opt
.
textContent
=
devs
[
j
];
elem
.
appendChild
(
opt
);
elem
.
appendChild
(
opt
);
}
}
...
@@ -479,7 +479,7 @@ function populate_midi_devs(type, attrs) {
...
@@ -479,7 +479,7 @@ function populate_midi_devs(type, attrs) {
elem
.
appendChild
(
opt
);
elem
.
appendChild
(
opt
);
for
(
j
=
0
;
j
<
devs
.
length
;
j
++
)
{
for
(
j
=
0
;
j
<
devs
.
length
;
j
++
)
{
opt
=
document
.
createElement
(
"
option
"
);
opt
=
document
.
createElement
(
"
option
"
);
opt
.
value
=
j
;
opt
.
value
=
j
;
opt
.
textContent
=
devs
[
j
];
opt
.
textContent
=
devs
[
j
];
elem
.
appendChild
(
opt
);
elem
.
appendChild
(
opt
);
}
}
...
@@ -507,8 +507,8 @@ function audio_prefs_callback(attrs) {
...
@@ -507,8 +507,8 @@ function audio_prefs_callback(attrs) {
document
.
getElementById
(
"
blocksize
"
).
value
=
get_attr
(
"
blocksize
"
,
attrs
);
document
.
getElementById
(
"
blocksize
"
).
value
=
get_attr
(
"
blocksize
"
,
attrs
);
document
.
getElementById
(
"
advance
"
).
value
=
get_attr
(
"
advance
"
,
attrs
);
document
.
getElementById
(
"
advance
"
).
value
=
get_attr
(
"
advance
"
,
attrs
);
var
callback
=
get_attr
(
"
cancallback
"
,
attrs
);
callback
=
get_attr
(
"
cancallback
"
,
attrs
);
//show the checkbox if the API allows
//show the checkbox if the API allows
if
(
callback
!==
-
1
)
{
if
(
callback
!==
-
1
)
{
document
.
getElementById
(
"
callback_container
"
)
document
.
getElementById
(
"
callback_container
"
)
.
classList
.
remove
(
"
hidden
"
);
.
classList
.
remove
(
"
hidden
"
);
...
@@ -594,10 +594,11 @@ function tr_text(id) {
...
@@ -594,10 +594,11 @@ function tr_text(id) {
// Stop-gap translator
// Stop-gap translator
function
translate_form
()
{
function
translate_form
()
{
var
i
;
var
elements
=
document
.
querySelectorAll
(
"
[data-i18n]
"
),
var
elements
=
document
.
querySelectorAll
(
"
[data-i18n]
"
);
data
,
i
;
for
(
i
=
0
;
i
<
elements
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
elements
.
length
;
i
++
)
{
var
data
=
elements
[
i
].
dataset
.
i18n
;
data
=
elements
[
i
].
dataset
.
i18n
;
if
(
data
.
slice
(
0
,
7
)
===
"
[title]
"
)
{
if
(
data
.
slice
(
0
,
7
)
===
"
[title]
"
)
{
elements
[
i
].
title
=
l
(
data
.
slice
(
7
));
elements
[
i
].
title
=
l
(
data
.
slice
(
7
));
}
else
{
}
else
{
...
@@ -608,8 +609,8 @@ function translate_form() {
...
@@ -608,8 +609,8 @@ function translate_form() {
function
populate_form
(
attr_array
)
{
function
populate_form
(
attr_array
)
{
// First, let's put the translated text for the form labels:
// First, let's put the translated text for the form labels:
var
i
;
for
(
var
i
=
0
;
i
<
attr_array
.
length
;
i
+=
2
)
{
for
(
i
=
0
;
i
<
attr_array
.
length
;
i
+=
2
)
{
// Unhide the span with the class with the same name as the id
// Unhide the span with the class with the same name as the id
var
prop_group
=
document
.
getElementsByClassName
(
attr_array
[
i
])[
0
];
var
prop_group
=
document
.
getElementsByClassName
(
attr_array
[
i
])[
0
];
if
(
prop_group
!==
undefined
)
{
if
(
prop_group
!==
undefined
)
{
...
...
pd/nw/dialog_search.html
View file @
c3bc6934
...
@@ -28,10 +28,11 @@ var doc_id = 0;
...
@@ -28,10 +28,11 @@ var doc_id = 0;
// Stop-gap translator
// Stop-gap translator
function
translate_form
()
{
function
translate_form
()
{
var
i
;
var
elements
=
document
.
querySelectorAll
(
"
[data-i18n]
"
),
var
elements
=
document
.
querySelectorAll
(
"
[data-i18n]
"
);
data
,
i
;
for
(
i
=
0
;
i
<
elements
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
elements
.
length
;
i
++
)
{
var
data
=
elements
[
i
].
dataset
.
i18n
;
data
=
elements
[
i
].
dataset
.
i18n
;
if
(
data
.
slice
(
0
,
7
)
===
"
[title]
"
)
{
if
(
data
.
slice
(
0
,
7
)
===
"
[title]
"
)
{
elements
[
i
].
title
=
l
(
data
.
slice
(
7
));
elements
[
i
].
title
=
l
(
data
.
slice
(
7
));
}
else
{
}
else
{
...
@@ -67,7 +68,6 @@ function add_doc_to_index(filename, data) {
...
@@ -67,7 +68,6 @@ function add_doc_to_index(filename, data) {
//"body": big_line,
//"body": big_line,
"
path
"
:
filename
"
path
"
:
filename
});
});
}
}
function
read_file
(
err
,
filename
,
stat
)
{
function
read_file
(
err
,
filename
,
stat
)
{
...
@@ -107,7 +107,7 @@ function console_unwrap_tag(console_elem, tag_name) {
...
@@ -107,7 +107,7 @@ function console_unwrap_tag(console_elem, tag_name) {
while
(
b
[
0
].
firstChild
)
{
while
(
b
[
0
].
firstChild
)
{
parent_elem
.
insertBefore
(
b
[
0
].
firstChild
,
b
[
0
]);
parent_elem
.
insertBefore
(
b
[
0
].
firstChild
,
b
[
0
]);
}
}
parent_elem
.
removeChild
(
b
[
0
]);
parent_elem
.
removeChild
(
b
[
0
]);
parent_elem
.
normalize
();
parent_elem
.
normalize
();
}
}
}
}
...
...
Write
Preview
Supports
Markdown
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