Skip to content

Commit 9c652d6

Browse files
lukebakkenmergify[bot]
authored andcommitted
Run prettier on title.js
(cherry picked from commit ca15fa7)
1 parent 5ad73c4 commit 9c652d6

File tree

1 file changed

+15
-16
lines changed
  • deps/rabbitmq_management/priv/www/js

1 file changed

+15
-16
lines changed

deps/rabbitmq_management/priv/www/js/title.js

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
(function (factory) {
2-
if (typeof define === 'function' && define.amd) {
3-
define(['jquery', 'sammy'], factory);
2+
if (typeof define === "function" && define.amd) {
3+
define(["jquery", "sammy"], factory);
44
} else {
5-
(window.Sammy = window.Sammy || {}).Title = factory(window.jQuery, window.Sammy);
5+
(window.Sammy = window.Sammy || {}).Title = factory(
6+
window.jQuery,
7+
window.Sammy,
8+
);
69
}
7-
}(function ($, Sammy) {
8-
10+
})(function ($, Sammy) {
911
// Sammy.Title is a very simple plugin to easily set the document's title.
1012
// It supplies a helper for setting the title (`title()`) within routes,
1113
// and an app level method for setting the global title (`setTitle()`)
12-
Sammy.Title = function() {
13-
14+
Sammy.Title = function () {
1415
// setTitle allows setting a global title or a function that modifies the
1516
// title for each route/page.
1617
//
@@ -38,28 +39,26 @@
3839
// });
3940
// });
4041
//
41-
this.setTitle = function(title) {
42+
this.setTitle = function (title) {
4243
if (!$.isFunction(title)) {
43-
this.title_function = function(additional_title) {
44-
return [title, additional_title].join(' ');
45-
}
44+
this.title_function = function (additional_title) {
45+
return [title, additional_title].join(" ");
46+
};
4647
} else {
4748
this.title_function = title;
4849
}
4950
};
5051

5152
// *Helper* title() sets the document title, passing it through the function
5253
// defined by setTitle() if set.
53-
this.helper('title', function() {
54-
var new_title = $.makeArray(arguments).join(' ');
54+
this.helper("title", function () {
55+
var new_title = $.makeArray(arguments).join(" ");
5556
if (this.app.title_function) {
5657
new_title = this.app.title_function(new_title);
5758
}
5859
document.title = new_title;
5960
});
60-
6161
};
6262

6363
return Sammy.Title;
64-
65-
}));
64+
});

0 commit comments

Comments
 (0)