Skip to content

Commit 1626198

Browse files
committed
Formatting
1 parent d3e5c9e commit 1626198

File tree

5 files changed

+515
-450
lines changed

5 files changed

+515
-450
lines changed

packages-exp/auth-exp/demo/public/common.js

+18-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2017 Google Inc.
3+
* Copyright 2017 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -19,7 +19,6 @@
1919
* @fileoverview Utilities for Auth test app features.
2020
*/
2121

22-
2322
/**
2423
* Initializes the widget for toggling reCAPTCHA size.
2524
* @param {function(string):void} callback The callback to call when the
@@ -34,21 +33,25 @@ function initRecaptchaToggle(callback) {
3433
// Set currently selected option.
3534
$(this).addClass('active');
3635
// Get the current reCAPTCHA setting label.
37-
var size = $(e.target).text().toLowerCase();
36+
var size = $(e.target)
37+
.text()
38+
.toLowerCase();
3839
callback(size);
3940
});
4041
}
4142

4243
// Install servicerWorker if supported.
4344
if ('serviceWorker' in navigator) {
44-
navigator.serviceWorker.register('/service-worker.js', {scope: '/'})
45-
.then(function(reg) {
46-
// Registration worked.
47-
console.log('Registration succeeded. Scope is ' + reg.scope);
48-
}).catch(function(error) {
49-
// Registration failed.
50-
console.log('Registration failed with ' + error.message);
51-
});
45+
navigator.serviceWorker
46+
.register('/service-worker.js', { scope: '/' })
47+
.then(function(reg) {
48+
// Registration worked.
49+
console.log('Registration succeeded. Scope is ' + reg.scope);
50+
})
51+
.catch(function(error) {
52+
// Registration failed.
53+
console.log('Registration failed with ' + error.message);
54+
});
5255
}
5356

5457
var webWorker = null;
@@ -59,11 +62,12 @@ if (window.Worker) {
5962
* @param {!Object} e The message event received.
6063
*/
6164
webWorker.onmessage = function(e) {
62-
console.log('User data passed through web worker: ', e.data);
65+
console.log('User data passed through web worker: ', e.data);
6366
switch (e.data.type) {
6467
case 'GET_USER_INFO':
6568
alertSuccess(
66-
'User data passed through web worker: ' + JSON.stringify(e.data));
69+
'User data passed through web worker: ' + JSON.stringify(e.data)
70+
);
6771
break;
6872
case 'RUN_TESTS':
6973
if (e.data.status == 'success') {
@@ -84,7 +88,7 @@ if (window.Worker) {
8488
*/
8589
function onGetCurrentUserDataFromWebWorker() {
8690
if (webWorker) {
87-
webWorker.postMessage({type: 'GET_USER_INFO'});
91+
webWorker.postMessage({ type: 'GET_USER_INFO' });
8892
} else {
8993
alertError('Error: Web workers are not supported in the current browser!');
9094
}

packages-exp/auth-exp/demo/rollup.config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const commonPlugins = [
3030
strip({
3131
functions: ['debugAssert.*']
3232
}),
33-
resolve(),
33+
resolve()
3434
];
3535

3636
const es5Builds = [
@@ -40,8 +40,8 @@ const es5Builds = [
4040
{
4141
input: 'src/index.js',
4242
output: [{ file: pkg.bundle, format: 'esm', sourcemap: true }],
43-
plugins: commonPlugins,
44-
},
43+
plugins: commonPlugins
44+
}
4545
];
4646

4747
export default [...es5Builds];

0 commit comments

Comments
 (0)