Commit c3bc6934 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

fix problems discovered with jslint

parent 59dd8049
......@@ -346,9 +346,10 @@ function substitute_space(arg) {
}
function strip_problem_chars(arg) {
var problem_chars = [";", ",", "{", "}", "\\"];
var ret = arg;
for(var i = 0; i < problem_chars.length; i++) {
var problem_chars = [";", ",", "{", "}", "\\"],
ret = arg,
i;
for(i = 0; i < problem_chars.length; i++) {
ret = ret.split(";").join("");
}
return ret;
......
......@@ -507,7 +507,7 @@ function audio_prefs_callback(attrs) {
document.getElementById("blocksize").value = get_attr("blocksize", 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
if (callback !== -1) {
document.getElementById("callback_container")
......@@ -594,10 +594,11 @@ function tr_text(id) {
// Stop-gap translator
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++) {
var data = elements[i].dataset.i18n;
data = elements[i].dataset.i18n;
if (data.slice(0,7) === "[title]") {
elements[i].title = l(data.slice(7));
} else {
......@@ -608,8 +609,8 @@ function translate_form() {
function populate_form(attr_array) {
// First, let's put the translated text for the form labels:
for(var i = 0; i < attr_array.length; i+=2) {
var i;
for(i = 0; i < attr_array.length; i+=2) {
// Unhide the span with the class with the same name as the id
var prop_group = document.getElementsByClassName(attr_array[i])[0];
if (prop_group !== undefined) {
......
......@@ -28,10 +28,11 @@ var doc_id = 0;
// Stop-gap translator
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++) {
var data = elements[i].dataset.i18n;
data = elements[i].dataset.i18n;
if (data.slice(0,7) === "[title]") {
elements[i].title = l(data.slice(7));
} else {
......@@ -67,7 +68,6 @@ function add_doc_to_index(filename, data) {
//"body": big_line,
"path": filename
});
}
function read_file(err, filename, stat) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment