diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js
index 4ec88313d6..0f7c8312fd 100644
--- a/chrome/content/zotero/overlay.js
+++ b/chrome/content/zotero/overlay.js
@@ -139,7 +139,10 @@ var ZoteroOverlay = new function()
// Used for loading pages from upgrade wizard
if (Zotero && Zotero.initialURL) {
- setTimeout("gBrowser.selectedTab = gBrowser.addTab(Zotero.initialURL); Zotero.initialURL = null;", 1);
+ setTimeout(function () {
+ gBrowser.selectedTab = gBrowser.addTab(Zotero.initialURL);
+ Zotero.initialURL = null;
+ }, 1);
}
// Hide browser chrome on Zotero tab
diff --git a/chrome/content/zotero/preferences/preferences.xul b/chrome/content/zotero/preferences/preferences.xul
index 3161e833bd..a29c2b9951 100644
--- a/chrome/content/zotero/preferences/preferences.xul
+++ b/chrome/content/zotero/preferences/preferences.xul
@@ -277,7 +277,7 @@ To add a new preference:
@@ -286,7 +286,7 @@ To add a new preference:
diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js
index 2c166012f9..1de116b3d0 100644
--- a/chrome/content/zotero/zoteroPane.js
+++ b/chrome/content/zotero/zoteroPane.js
@@ -396,7 +396,10 @@ var ZoteroPane = new function()
}
// Focus the quicksearch on pane open
- setTimeout("document.getElementById('zotero-tb-search').inputField.select();", 1);
+ var searchBar = document.getElementById('zotero-tb-search');
+ setTimeout(function () {
+ searchBar.inputField.select();
+ }, 1);
// Auto-empty trashed items older than a certain number of days
var days = Zotero.Prefs.get('trashAutoEmptyDays');
@@ -1749,11 +1752,17 @@ var ZoteroPane = new function()
if (event.keyCode == event.DOM_VK_ESCAPE) {
textbox.value = '';
ZoteroPane_Local.setItemsPaneMessage(Zotero.getString('searchInProgress'));
- setTimeout("ZoteroPane_Local.search(); ZoteroPane_Local.clearItemsPaneMessage();", 1);
+ setTimeout(function () {
+ ZoteroPane_Local.search();
+ ZoteroPane_Local.clearItemsPaneMessage();
+ }, 1);
}
else if (event.keyCode == event.DOM_VK_RETURN || event.keyCode == event.DOM_VK_ENTER) {
ZoteroPane_Local.setItemsPaneMessage(Zotero.getString('searchInProgress'));
- setTimeout("ZoteroPane_Local.search(true); ZoteroPane_Local.clearItemsPaneMessage();", 1);
+ setTimeout(function () {
+ ZoteroPane_Local.search(true);
+ ZoteroPane_Local.clearItemsPaneMessage();
+ }, 1);
}
}
@@ -1763,7 +1772,10 @@ var ZoteroPane = new function()
// result of Undo or Redo
if (!textbox.value.length) {
ZoteroPane_Local.setItemsPaneMessage(Zotero.getString('searchInProgress'));
- setTimeout("ZoteroPane_Local.search(); ZoteroPane_Local.clearItemsPaneMessage();", 1);
+ setTimeout(function () {
+ ZoteroPane_Local.search();
+ ZoteroPane_Local.clearItemsPaneMessage();
+ }, 1);
}
else if (textbox.value.indexOf('"') != -1) {
ZoteroPane_Local.setItemsPaneMessage(Zotero.getString('advancedSearchMode'));
diff --git a/chrome/skin/default/zotero/timeline/timelineControls.js b/chrome/skin/default/zotero/timeline/timelineControls.js
index b193a88571..d0cd1f18b9 100644
--- a/chrome/skin/default/zotero/timeline/timelineControls.js
+++ b/chrome/skin/default/zotero/timeline/timelineControls.js
@@ -87,7 +87,9 @@ function doKeyPress(e)
checkDate(lastJumpToYearValue);
}
else {
- jumpToYearTimer = setTimeout('wasChanged(document.getElementById("jumpYear").value);', 1000)
+ jumpToYearTimer = setTimeout(function () {
+ wasChanged(document.getElementById("jumpYear").value);
+ }, 1000)
}
}