Skip to content

Commit

Permalink
Refactoring code, remove alert()
Browse files Browse the repository at this point in the history
  • Loading branch information
KeziahMoselle committed Sep 29, 2018
1 parent 8607a1d commit 96ed32a
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions src/renderer.js
Original file line number Diff line number Diff line change
@@ -1,58 +1,48 @@
/* global M, alert, themeCustomization */
/* global M, themeCustomization */

require('dotenv').config()

// Modules
const { shell, remote } = require('electron')

const axios = require('axios')

const store = require('./store')

const saveFile = remote.require('electron-save-file')

// HTML elements
const root = document.getElementById('root')
// Body

const searchBar = document.getElementById('searchBar')
// Input type text

const loading = document.getElementById('loading')
// Display loading or not

const container = document.getElementById('container')
// Container of images

const displayRating = document.getElementById('displayRating')
// Display Rating

const displayLimit = document.getElementById('displayLimit')
// Display Image limit chip

const displayLayout = document.getElementById('displayLayout')
// Display Card Layout

const displayPid = document.getElementById('displayPid')
// Display chip

const sidenavImageSource = document.getElementById('sidenavImageSource')
const sidenavImageSaveAs = document.getElementById('sidenavImageSaveAs')
const sidenavImageDirectory = document.getElementById('sidenavImageDirectory')
const sidenavImageOwner = document.getElementById('sidenavImageOwner')
const sidenavImageScore = document.getElementById('sidenavImageScore')

const chips = document.querySelector('.chips')

const checkboxTheme = document.getElementById('checkboxTheme')

// Values
let tags

let rating = 'rating:safe'

let imgLimit = 10

let view = 'one_column'

let pid = 1

let tagsBlacklist = ''

// Minimize
Expand Down Expand Up @@ -495,7 +485,7 @@ function getResults (url) {
})
} else { // We don't find any results
hideLoading()
alert('Any results was found')
M.toast({ html: 'Any results was found.' })
}
})
}
Expand Down

0 comments on commit 96ed32a

Please sign in to comment.