Skip to content

Commit

Permalink
standard
Browse files Browse the repository at this point in the history
  • Loading branch information
Naozumi committed Dec 20, 2022
1 parent 0dc6557 commit e519ed1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ let windowState = {
y: 0
}

function log(message, type) {
function log (message, type) {
message.split('\n').forEach(line => console.log(`Remedy Pro [${type || 'info'}]: ${line}`))
};

client.on('ready', async () => {
log(`logged in with account ${client.user.username}.`)
})

async function initialize() {
async function initialize () {
log(`Starting services\nVersion ${require('../package.json').version}`, 'client')
await pie.initialize(app)
}

function createMenu(tab1, tab2, tab3) {
function createMenu (tab1, tab2, tab3) {
contextMenu = Menu.buildFromTemplate([
{
label: tab1,
Expand Down Expand Up @@ -77,7 +77,7 @@ function createMenu(tab1, tab2, tab3) {
return contextMenu
}

async function createWindow() {
async function createWindow () {
log('Creating window...', 'client')
storage.get('screenPosition', function (error, object) {
if (error) throw error
Expand Down Expand Up @@ -208,7 +208,7 @@ preferences.on('save', () => {
}
})

function loginSetup() {
function loginSetup () {
const prompt = new BrowserWindow({
title: 'Remedy login prompt',
titleBarStyle: 'hidden',
Expand Down
8 changes: 4 additions & 4 deletions src/overlayScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ console.log = function (text, input) {
spans = document.getElementsByTagName('span')
const id = input.data.user.id; const name = input.data.nick; uState = input.data.voice_state
for (let i = 0; i < spans.length; i++) {
let element = document.getElementsByClassName(spans[0].className)[i].parentElement
let imgSrc = element.parentElement.getElementsByTagName('img')[0].src
const element = document.getElementsByClassName(spans[0].className)[i].parentElement
const imgSrc = element.parentElement.getElementsByTagName('img')[0].src
if (imgSrc.match(/\d{18}/g)[0] === id) {
text = name
if (uState.self_mute || uState.mute) {
Expand Down Expand Up @@ -69,8 +69,8 @@ ipcRenderer.on('event', (_, msg) => {
break
}
for (let i = 0; i < spans.length; i++) {
let element = document.getElementsByClassName(spans[0].className)[i].parentElement
let imgSrc = element.parentElement.getElementsByTagName('img')[0].src
const element = document.getElementsByClassName(spans[0].className)[i].parentElement
const imgSrc = element.parentElement.getElementsByTagName('img')[0].src
if (imgSrc.match(/\d{18}/g)[0] === args.userId) {
text = args.user
if (uState.self_mute || uState.mute) {
Expand Down

0 comments on commit e519ed1

Please sign in to comment.