Skip to content

Commit 429a2d9

Browse files
committed
Reformat code, no other change
1 parent 95e59b0 commit 429a2d9

File tree

1 file changed

+41
-38
lines changed

1 file changed

+41
-38
lines changed

Diff for: ide/main/src/content/selenium-ide-loader.js

+41-38
Original file line numberDiff line numberDiff line change
@@ -18,50 +18,53 @@
1818
// functions to call IDE from browser window.
1919
//
2020

21-
if (!this.SeleniumIDE) this.SeleniumIDE = {};
21+
if (!this.SeleniumIDE) {
22+
this.SeleniumIDE = {};
23+
}
2224

2325
SeleniumIDE.Loader = {};
2426

25-
SeleniumIDE.Loader.openRecorder = function() {
26-
toOpenWindowByType('global:selenium-ide','chrome://selenium-ide/content/selenium-ide.xul');
27-
}
27+
SeleniumIDE.Loader.openRecorder = function () {
28+
toOpenWindowByType('global:selenium-ide', 'chrome://selenium-ide/content/selenium-ide.xul');
29+
};
2830

29-
SeleniumIDE.Loader.getTopEditor = function() {
30-
var editors = this.getEditors();
31-
if (editors.length > 0) {
32-
return editors[0];
33-
} else {
34-
return null;
35-
}
36-
}
31+
SeleniumIDE.Loader.getTopEditor = function () {
32+
var editors = this.getEditors();
33+
if (editors.length > 0) {
34+
return editors[0];
35+
} else {
36+
return null;
37+
}
38+
};
3739

38-
SeleniumIDE.Loader.getEditors = function() {
39-
var editors = [];
40+
SeleniumIDE.Loader.getEditors = function () {
41+
var editors = [];
4042
var editor = this.getSidebarEditor(document);
41-
if (editor) {
43+
if (editor) {
4244
editors.push(editor);
43-
}
44-
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);
45-
var editorWindow = wm.getMostRecentWindow('global:selenium-ide');
46-
if (editorWindow && editorWindow.editor) {
47-
editors.push(editorWindow.editor);
48-
}
45+
}
46+
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);
47+
var editorWindow = wm.getMostRecentWindow('global:selenium-ide');
48+
if (editorWindow && editorWindow.editor) {
49+
editors.push(editorWindow.editor);
50+
}
4951
var mainWindow = wm.getMostRecentWindow("navigator:browser");
5052
editor = this.getSidebarEditor(mainWindow.document);
5153
if (editor) {
5254
editors.push(editor);
5355
}
54-
return editors;
56+
return editors;
5557
};
5658

57-
SeleniumIDE.Loader.getSidebarEditor = function(doc) {
59+
SeleniumIDE.Loader.getSidebarEditor = function (doc) {
5860
if (doc) {
5961
var sidebarBox = doc.getElementById('sidebar-box');
6062
if (sidebarBox && !sidebarBox.hidden) {
6163
var sidebar = doc.getElementById('sidebar');
6264
try {
6365
if (sidebar && sidebar.contentDocument) {
64-
if ("chrome://selenium-ide/content/selenium-ide-sidebar.xul" == sidebar.contentDocument.documentURI) {
66+
if ("chrome://selenium-ide/content/selenium-ide-sidebar.xul"
67+
== sidebar.contentDocument.documentURI) {
6568
var sidebarView = sidebar.contentDocument.defaultView;
6669
if (sidebarView && sidebarView.editor) {
6770
return sidebarView.editor;
@@ -74,19 +77,19 @@ SeleniumIDE.Loader.getSidebarEditor = function(doc) {
7477
}
7578
};
7679

77-
SeleniumIDE.Loader.reloadRecorder = function(contentWindow, isRootDocument) {
78-
var editors = this.getEditors();
79-
for (var i = 0; i < editors.length; i++) {
80-
editors[i].loadRecorderFor(contentWindow, isRootDocument);
81-
}
82-
}
80+
SeleniumIDE.Loader.reloadRecorder = function (contentWindow, isRootDocument) {
81+
var editors = this.getEditors();
82+
for (var i = 0; i < editors.length; i++) {
83+
editors[i].loadRecorderFor(contentWindow, isRootDocument);
84+
}
85+
};
8386

84-
SeleniumIDE.Loader.notifyUnload = function(doc) {
85-
this.getEditors().forEach(function(editor) {
86-
editor.onUnloadDocument(doc);
87-
});
88-
}
87+
SeleniumIDE.Loader.notifyUnload = function (doc) {
88+
this.getEditors().forEach(function (editor) {
89+
editor.onUnloadDocument(doc);
90+
});
91+
};
8992

90-
SeleniumIDE.Loader.getRecorder = function(window) {
91-
return window._Selenium_IDE_Recorder;
92-
}
93+
SeleniumIDE.Loader.getRecorder = function (window) {
94+
return window._Selenium_IDE_Recorder;
95+
};

0 commit comments

Comments
 (0)