Skip to content

Commit

Permalink
Run prettier on JS files
Browse files Browse the repository at this point in the history
  • Loading branch information
nono committed Jan 25, 2024
1 parent d0935b1 commit 44fad37
Show file tree
Hide file tree
Showing 14 changed files with 232 additions and 229 deletions.
2 changes: 1 addition & 1 deletion assets/scripts/check-deeplink.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function check(uri, failCb) {
}
}

(function (window) {
;(function (window) {

Check failure on line 93 in assets/scripts/check-deeplink.js

View workflow job for this annotation

GitHub Actions / lint

Unnecessary semicolon
let params = new URLSearchParams(document.location.search.substring(1))

const fallbackUri = params.get('fallback_uri')
Expand Down
10 changes: 5 additions & 5 deletions assets/scripts/cirrus.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function (w, d) {
;(function (w, d) {

Check failure on line 1 in assets/scripts/cirrus.js

View workflow job for this annotation

GitHub Actions / lint

Unnecessary semicolon
// On android, change the address bar color to match the page background
const paperColor = getComputedStyle(d.body).getPropertyValue(
'--paperBackgroundColor'
'--paperBackgroundColor',
)
if (paperColor) {
const themeColor = d.querySelector('meta[name=theme-color]')
Expand Down Expand Up @@ -57,10 +57,10 @@
event.preventDefault()
expand.classList.toggle('expanded')

if (expand.getAttribute("aria-expanded") === "true") {
expand.setAttribute("aria-expanded", "false")
if (expand.getAttribute('aria-expanded') === 'true') {
expand.setAttribute('aria-expanded', 'false')
} else {
expand.setAttribute("aria-expanded", "true")
expand.setAttribute('aria-expanded', 'true')
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/confirm-flagship.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function (w, d) {
;(function (w, d) {

Check failure on line 1 in assets/scripts/confirm-flagship.js

View workflow job for this annotation

GitHub Actions / lint

Unnecessary semicolon
if (!w.fetch || !w.Headers) return

const form = d.getElementById('confirm-flagship-form')
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/import.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function (w) {
;(function (w) {

Check failure on line 1 in assets/scripts/import.js

View workflow job for this annotation

GitHub Actions / lint

Unnecessary semicolon
var url = w.location.host + '/move/importing/realtime'
if (w.location.protocol === 'http:') {
url = 'ws://' + url
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/login.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function (w, d) {
;(function (w, d) {

Check failure on line 1 in assets/scripts/login.js

View workflow job for this annotation

GitHub Actions / lint

Unnecessary semicolon
if (!w.fetch || !w.Headers) return

const loginForm = d.getElementById('login-form')
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/new-password.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function (w, d) {
;(function (w, d) {

Check failure on line 1 in assets/scripts/new-password.js

View workflow job for this annotation

GitHub Actions / lint

Unnecessary semicolon
if (!w.fetch || !w.Headers) return

const form = d.getElementById('new-pass-form')
Expand Down
7 changes: 5 additions & 2 deletions assets/scripts/oauth-clients.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ function listenToRealtimeOAuthClientsUpdates(w, d) {
socket.onopen = () => {
const authMsg = JSON.stringify({ method: 'AUTH', payload: token })
socket.send(authMsg)
const subscribeMsg = JSON.stringify({ method: 'SUBSCRIBE', payload: { type: 'io.cozy.oauth.clients' } })
const subscribeMsg = JSON.stringify({
method: 'SUBSCRIBE',
payload: { type: 'io.cozy.oauth.clients' },
})
socket.send(subscribeMsg)
}
socket.onerror = (err) => {
Expand All @@ -27,7 +30,7 @@ function listenToRealtimeOAuthClientsUpdates(w, d) {
}
}

(function (w, d) {
;(function (w, d) {

Check failure on line 33 in assets/scripts/oauth-clients.js

View workflow job for this annotation

GitHub Actions / lint

Unnecessary semicolon
listenToRealtimeOAuthClientsUpdates(w, d)

const refreshBtn = d.querySelector('#refresh-btn')
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/oidc-twofactor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function (w, d) {
;(function (w, d) {

Check failure on line 1 in assets/scripts/oidc-twofactor.js

View workflow job for this annotation

GitHub Actions / lint

Unnecessary semicolon
const form = d.getElementById('oidc-twofactor-form')
const trustedTokenInput = d.getElementById('trusted-device-token')

Expand Down
6 changes: 3 additions & 3 deletions assets/scripts/password-helpers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function (w) {
;(function (w) {

Check failure on line 1 in assets/scripts/password-helpers.js

View workflow job for this annotation

GitHub Actions / lint

Unnecessary semicolon
// Return given password strength as an object {percentage, label}
function getStrength(password) {
if (!password && password !== '') {
Expand Down Expand Up @@ -149,7 +149,7 @@
return subtle
.importKey('raw', masterKey, { name: 'AES-CBC' }, false, ['encrypt'])
.then((impKey) =>
subtle.encrypt({ name: 'AES-CBC', iv: iv }, impKey, encKey)
subtle.encrypt({ name: 'AES-CBC', iv: iv }, impKey, encKey),
)
.then((encrypted) => {
const iv64 = fromBufferToB64(iv)
Expand Down Expand Up @@ -192,7 +192,7 @@
])
})
.then((impKey) =>
subtle.encrypt({ name: 'AES-CBC', iv: iv }, impKey, privateKey)
subtle.encrypt({ name: 'AES-CBC', iv: iv }, impKey, privateKey),
)
.then((encrypted) => {
encryptedKey = encrypted
Expand Down
6 changes: 3 additions & 3 deletions assets/scripts/password-strength.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function (w, d) {
;(function (w, d) {

Check failure on line 1 in assets/scripts/password-strength.js

View workflow job for this annotation

GitHub Actions / lint

Unnecessary semicolon
const form = d.getElementsByTagName('form')[0]
const passInput = d.getElementById('password')
const passTip = d.getElementById('password-tooltip')
Expand All @@ -12,12 +12,12 @@
indicator.setAttribute('aria-valuenow', pct)
indicator.setAttribute(
'class',
`progress-bar w-${pct} pass-${strength.label}`
`progress-bar w-${pct} pass-${strength.label}`,
)
passInput.classList.remove('is-invalid')
passTip && passTip.classList.remove('text-error')
},
false
false,
)

form.addEventListener('submit', function (event) {
Expand Down
4 changes: 2 additions & 2 deletions assets/scripts/password-visibility.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function (d) {
;(function (d) {
var visible = false
var input = d.getElementById('password')
var button = d.getElementById('password-visibility-button')
Expand All @@ -22,7 +22,7 @@
'title',
visible
? button.getAttribute('data-hide')
: button.getAttribute('data-show')
: button.getAttribute('data-show'),
)

input.focus()
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/share-by-link.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function (w, d) {
;(function (w, d) {
if (!w.fetch || !w.Headers) return

const form = d.getElementById('share-by-link-password-form')
Expand Down
4 changes: 2 additions & 2 deletions assets/scripts/twofactor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function (w, d) {
;(function (w, d) {
if (!w.fetch || !w.Headers) return

const twofaForm = d.getElementById('two-factor-form')
Expand Down Expand Up @@ -64,7 +64,7 @@
) {
storage.setItem(
'trusted-device-token',
body.two_factor_trusted_device_token
body.two_factor_trusted_device_token,
)
}
const tooltip = twofaField.querySelector('.invalid-tooltip')
Expand Down
Loading

0 comments on commit 44fad37

Please sign in to comment.