Remove console.logs (#2606)

* remove console.logs

* use 'off' instead of 0
This commit is contained in:
ChunkyProgrammer 2022-09-22 21:04:10 -04:00 committed by GitHub
parent 420a91a072
commit 7822f7423e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 70 additions and 174 deletions

View File

@ -32,12 +32,12 @@ module.exports = {
plugins: ['vue'], plugins: ['vue'],
rules: { rules: {
'space-before-function-paren': 0, 'space-before-function-paren': 'off',
'comma-dangle': ['error', 'never'], 'comma-dangle': ['error', 'never'],
'vue/no-v-html': 'off', 'vue/no-v-html': 'off',
'no-console': 0, 'no-console': ['error', { allow: ['warn', 'error'] }],
'no-unused-vars': 1, 'no-unused-vars': 'warn',
'no-undef': 1, 'no-undef': 'warn',
'vue/no-template-key': 1 'vue/no-template-key': 'warn'
} }
} }

View File

@ -9,7 +9,6 @@ import { IpcChannels, DBActions, SyncEvents } from '../constants'
import baseHandlers from '../datastores/handlers/base' import baseHandlers from '../datastores/handlers/base'
if (process.argv.includes('--version')) { if (process.argv.includes('--version')) {
console.log(`v${app.getVersion()}`)
app.exit() app.exit()
} else { } else {
runApp() runApp()
@ -172,7 +171,7 @@ function runApp() {
require('vue-devtools').install() require('vue-devtools').install()
/* eslint-enable */ /* eslint-enable */
} catch (err) { } catch (err) {
console.log(err) console.error(err)
} }
} }
@ -195,7 +194,7 @@ function runApp() {
return nativeTheme.shouldUseDarkColors ? '#212121' : '#f1f1f1' return nativeTheme.shouldUseDarkColors ? '#212121' : '#f1f1f1'
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.error(error)
// Default to nativeTheme settings if nothing is found. // Default to nativeTheme settings if nothing is found.
return nativeTheme.shouldUseDarkColors ? '#212121' : '#f1f1f1' return nativeTheme.shouldUseDarkColors ? '#212121' : '#f1f1f1'
}) })
@ -258,7 +257,6 @@ function runApp() {
const boundsDoc = await baseHandlers.settings._findBounds() const boundsDoc = await baseHandlers.settings._findBounds()
if (typeof boundsDoc?.value === 'object') { if (typeof boundsDoc?.value === 'object') {
console.log({ boundsDoc })
const { maximized, fullScreen, ...bounds } = boundsDoc.value const { maximized, fullScreen, ...bounds } = boundsDoc.value
const allDisplaysSummaryWidth = screen const allDisplaysSummaryWidth = screen
.getAllDisplays() .getAllDisplays()
@ -348,8 +346,6 @@ function runApp() {
// Which raises "Object has been destroyed" error // Which raises "Object has been destroyed" error
mainWindow = allWindows[0] mainWindow = allWindows[0]
} }
console.log('closed')
}) })
} }
@ -401,7 +397,6 @@ function runApp() {
}) })
ipcMain.on(IpcChannels.ENABLE_PROXY, (_, url) => { ipcMain.on(IpcChannels.ENABLE_PROXY, (_, url) => {
console.log(url)
session.defaultSession.setProxy({ session.defaultSession.setProxy({
proxyRules: url proxyRules: url
}) })

View File

@ -159,7 +159,6 @@ export default Vue.extend({
this.grabAllPlaylists() this.grabAllPlaylists()
if (process.env.IS_ELECTRON) { if (process.env.IS_ELECTRON) {
console.log('User is using Electron')
ipcRenderer = require('electron').ipcRenderer ipcRenderer = require('electron').ipcRenderer
this.setupListenersToSyncWindows() this.setupListenersToSyncWindows()
this.activateKeyboardShortcuts() this.activateKeyboardShortcuts()
@ -194,11 +193,8 @@ export default Vue.extend({
}, },
updateTheme: function (theme) { updateTheme: function (theme) {
console.group('updateTheme')
console.log('Theme: ', theme)
document.body.className = `${theme.baseTheme} main${theme.mainColor} sec${theme.secColor}` document.body.className = `${theme.baseTheme} main${theme.mainColor} sec${theme.secColor}`
document.body.dataset.systemTheme = this.systemTheme document.body.dataset.systemTheme = this.systemTheme
console.groupEnd()
}, },
checkForNewUpdates: function () { checkForNewUpdates: function () {

View File

@ -528,8 +528,7 @@ export default Vue.extend({
} }
}) })
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
console.log('error reading')
const message = this.$t('Settings.Data Settings.Invalid subscriptions file') const message = this.$t('Settings.Data Settings.Invalid subscriptions file')
this.showToast({ this.showToast({
message: `${message}: ${err}` message: `${message}: ${err}`
@ -946,7 +945,7 @@ export default Vue.extend({
this.handleFreetubeImportFile(dbLocation) this.handleFreetubeImportFile(dbLocation)
fs.unlink(dbLocation, (err) => { fs.unlink(dbLocation, (err) => {
if (err) { if (err) {
console.log(err) console.error(err)
} }
}) })
}, },
@ -1285,7 +1284,7 @@ export default Vue.extend({
this.invidiousAPICall(subscriptionsPayload).then((response) => { this.invidiousAPICall(subscriptionsPayload).then((response) => {
resolve(response) resolve(response)
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Invidious API Error (Click to copy)') const errorMessage = this.$t('Invidious API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err.responseJSON.error}`, message: `${errorMessage}: ${err.responseJSON.error}`,
@ -1312,7 +1311,7 @@ export default Vue.extend({
ytch.getChannelInfo({ channelId: channelId }).then(async (response) => { ytch.getChannelInfo({ channelId: channelId }).then(async (response) => {
resolve(response) resolve(response)
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Local API Error (Click to copy)') const errorMessage = this.$t('Local API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err}`, message: `${errorMessage}: ${err}`,

View File

@ -31,12 +31,5 @@ export default Vue.extend({
listType: function () { listType: function () {
return this.$store.getters.getListType return this.$store.getters.getListType
} }
},
mounted: function () {
},
methods: {
goToChannel: function () {
console.log('TODO: ft-list-channel method goToChannel')
}
} }
}) })

View File

@ -291,9 +291,6 @@ export default Vue.extend({
}, },
handleOptionsClick: function (option) { handleOptionsClick: function (option) {
console.log('Handling share')
console.log(option)
switch (option) { switch (option) {
case 'history': case 'history':
if (this.watched) { if (this.watched) {

View File

@ -111,8 +111,6 @@ export default Vue.extend({
profile._id = this.profileId profile._id = this.profileId
} }
console.log(profile)
if (this.isNew) { if (this.isNew) {
this.createProfile(profile) this.createProfile(profile)
this.showToast({ this.showToast({

View File

@ -157,7 +157,7 @@ export default Vue.extend({
try { try {
return JSON.parse(this.$store.getters.getDefaultCaptionSettings) return JSON.parse(this.$store.getters.getDefaultCaptionSettings)
} catch (e) { } catch (e) {
console.log(e) console.error(e)
return {} return {}
} }
}, },
@ -343,7 +343,6 @@ export default Vue.extend({
}, },
methods: { methods: {
initializePlayer: async function () { initializePlayer: async function () {
console.log(this.adaptiveFormats)
const videoPlayer = document.getElementById(this.id) const videoPlayer = document.getElementById(this.id)
if (videoPlayer !== null) { if (videoPlayer !== null) {
if (!this.useDash) { if (!this.useDash) {
@ -1034,7 +1033,7 @@ export default Vue.extend({
enableDashFormat: function () { enableDashFormat: function () {
if (this.dashSrc === null) { if (this.dashSrc === null) {
console.log('No dash format available.') console.warn('No dash format available.')
return return
} }
@ -1047,7 +1046,7 @@ export default Vue.extend({
enableLegacyFormat: function () { enableLegacyFormat: function () {
if (this.sourceList.length === 0) { if (this.sourceList.length === 0) {
console.log('No sources available') console.error('No sources available')
return return
} }
@ -1112,7 +1111,6 @@ export default Vue.extend({
const frameTime = 1 / fps const frameTime = 1 / fps
const dist = frameTime * step const dist = frameTime * step
this.player.currentTime(this.player.currentTime() + dist) this.player.currentTime(this.player.currentTime() + dist)
console.log(fps)
}, },
changeVolume: function (volume) { changeVolume: function (volume) {
@ -1427,7 +1425,6 @@ export default Vue.extend({
VjsButton.call(this, player, options) VjsButton.call(this, player, options)
}, },
handleClick: (event) => { handleClick: (event) => {
console.log(event)
const selectedQuality = event.target.innerText const selectedQuality = event.target.innerText
const bitrate = selectedQuality === 'auto' ? 'auto' : parseInt(event.target.attributes.bitrate.value) const bitrate = selectedQuality === 'auto' ? 'auto' : parseInt(event.target.attributes.bitrate.value)
this.setDashQualityLevel(bitrate) this.setDashQualityLevel(bitrate)
@ -1685,7 +1682,6 @@ export default Vue.extend({
clearTimeout(this.touchPauseTimeout) clearTimeout(this.touchPauseTimeout)
}, },
toggleShowStatsModal: function() { toggleShowStatsModal: function() {
console.log(this.format)
if (this.format !== 'dash') { if (this.format !== 'dash') {
this.showToast({ this.showToast({
message: this.$t('Video.Stats.Video statistics are not available for legacy videos') message: this.$t('Video.Stats.Video statistics are not available for legacy videos')

View File

@ -205,7 +205,6 @@ export default Vue.extend({
handlePreferredApiBackend: function (backend) { handlePreferredApiBackend: function (backend) {
this.updateBackendPreference(backend) this.updateBackendPreference(backend)
console.log(backend)
if (backend === 'local') { if (backend === 'local') {
this.updateForceLocalBackendForLegacy(false) this.updateForceLocalBackendForLegacy(false)

View File

@ -82,7 +82,6 @@ export default Vue.extend({
} }
}, },
mounted: function () { mounted: function () {
console.log(this.data)
this.id = this.data.id this.id = this.data.id
this.firstVideoId = this.data.firstVideoId this.firstVideoId = this.data.firstVideoId
this.title = this.data.title this.title = this.data.title

View File

@ -252,9 +252,9 @@ export default Vue.extend({
this.invidiousAPICall(searchPayload).then((results) => { this.invidiousAPICall(searchPayload).then((results) => {
this.searchSuggestionsDataList = results.suggestions this.searchSuggestionsDataList = results.suggestions
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
if (this.backendFallback) { if (this.backendFallback) {
console.log( console.error(
'Error gettings search suggestions. Falling back to Local API' 'Error gettings search suggestions. Falling back to Local API'
) )
this.getSearchSuggestionsLocal(query) this.getSearchSuggestionsLocal(query)

View File

@ -182,7 +182,7 @@ export default Vue.extend({
ytcm.getComments(payload).then((response) => { ytcm.getComments(payload).then((response) => {
this.parseLocalCommentData(response, null) this.parseLocalCommentData(response, null)
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Local API Error (Click to copy)') const errorMessage = this.$t('Local API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err}`, message: `${errorMessage}: ${err}`,
@ -217,7 +217,7 @@ export default Vue.extend({
ytcm.getCommentReplies(payload).then((response) => { ytcm.getCommentReplies(payload).then((response) => {
this.parseLocalCommentData(response, payload.index) this.parseLocalCommentData(response, payload.index)
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Local API Error (Click to copy)') const errorMessage = this.$t('Local API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err}`, message: `${errorMessage}: ${err}`,
@ -332,8 +332,7 @@ export default Vue.extend({
this.isLoading = false this.isLoading = false
this.showComments = true this.showComments = true
}).catch((xhr) => { }).catch((xhr) => {
console.log('found an error') console.error(xhr)
console.log(xhr)
const errorMessage = this.$t('Invidious API Error (Click to copy)') const errorMessage = this.$t('Invidious API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${xhr.responseText}`, message: `${errorMessage}: ${xhr.responseText}`,
@ -389,8 +388,7 @@ export default Vue.extend({
this.commentData[index].showReplies = true this.commentData[index].showReplies = true
this.isLoading = false this.isLoading = false
}).catch((xhr) => { }).catch((xhr) => {
console.log('found an error') console.error(xhr)
console.log(xhr)
const errorMessage = this.$t('Invidious API Error (Click to copy)') const errorMessage = this.$t('Invidious API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${xhr.responseText}`, message: `${errorMessage}: ${xhr.responseText}`,

View File

@ -2,7 +2,6 @@ import Vue from 'vue'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import FtCard from '../ft-card/ft-card.vue' import FtCard from '../ft-card/ft-card.vue'
import FtButton from '../ft-button/ft-button.vue' import FtButton from '../ft-button/ft-button.vue'
import FtListDropdown from '../ft-list-dropdown/ft-list-dropdown.vue'
import FtFlexBox from '../ft-flex-box/ft-flex-box.vue' import FtFlexBox from '../ft-flex-box/ft-flex-box.vue'
import FtIconButton from '../ft-icon-button/ft-icon-button.vue' import FtIconButton from '../ft-icon-button/ft-icon-button.vue'
import FtShareButton from '../ft-share-button/ft-share-button.vue' import FtShareButton from '../ft-share-button/ft-share-button.vue'
@ -14,7 +13,6 @@ export default Vue.extend({
components: { components: {
'ft-card': FtCard, 'ft-card': FtCard,
'ft-button': FtButton, 'ft-button': FtButton,
'ft-list-dropdown': FtListDropdown,
'ft-flex-box': FtFlexBox, 'ft-flex-box': FtFlexBox,
'ft-icon-button': FtIconButton, 'ft-icon-button': FtIconButton,
'ft-share-button': FtShareButton 'ft-share-button': FtShareButton

View File

@ -85,7 +85,6 @@ export default Vue.extend({
} else { } else {
switch (this.backendPreference) { switch (this.backendPreference) {
case 'local': case 'local':
console.log('Getting Chat')
this.getLiveChatLocal() this.getLiveChatLocal()
break break
case 'invidious': case 'invidious':
@ -115,13 +114,12 @@ export default Vue.extend({
this.isLoading = false this.isLoading = false
this.liveChat.on('start', (liveId) => { this.liveChat.on('start', (liveId) => {
console.log('Live chat is enabled')
this.isLoading = false this.isLoading = false
}) })
this.liveChat.on('end', (reason) => { this.liveChat.on('end', (reason) => {
console.log('Live chat has ended') console.error('Live chat has ended')
console.log(reason) console.error(reason)
this.hasError = true this.hasError = true
this.showEnableChat = false this.showEnableChat = false
this.errorMessage = this.$t('Video["Chat is disabled or the Live Stream has ended."]') this.errorMessage = this.$t('Video["Chat is disabled or the Live Stream has ended."]')
@ -141,8 +139,6 @@ export default Vue.extend({
}, },
parseLiveChatComment: function (comment) { parseLiveChatComment: function (comment) {
console.log(comment)
if (this.hasEnded) { if (this.hasEnded) {
return return
} }
@ -171,13 +167,12 @@ export default Vue.extend({
const liveChatMessage = $('.liveChatMessage') const liveChatMessage = $('.liveChatMessage')
if (typeof (liveChatComments.get(0)) === 'undefined' && typeof (liveChatMessage.get(0)) === 'undefined') { if (typeof (liveChatComments.get(0)) === 'undefined' && typeof (liveChatMessage.get(0)) === 'undefined') {
console.log("Can't find chat object. Stopping chat connection") console.error("Can't find chat object. Stopping chat connection")
this.liveChat.stop() this.liveChat.stop()
return return
} }
this.comments.push(comment) this.comments.push(comment)
console.log(this.comments.length)
if (typeof (comment.superchat) !== 'undefined') { if (typeof (comment.superchat) !== 'undefined') {
this.getRandomColorClass().then((data) => { this.getRandomColorClass().then((data) => {
@ -211,7 +206,6 @@ export default Vue.extend({
} }
if (this.comments.length > 150 && this.stayAtBottom) { if (this.comments.length > 150 && this.stayAtBottom) {
console.log('user is not at bottom')
this.comments = this.comments.splice(this.comments.length - 150, this.comments.length) this.comments = this.comments.splice(this.comments.length - 150, this.comments.length)
} }
}, },

View File

@ -278,9 +278,6 @@ export default Vue.extend({
this.isLoading = true this.isLoading = true
this.ytGetPlaylistInfo(this.playlistId).then((result) => { this.ytGetPlaylistInfo(this.playlistId).then((result) => {
console.log('done')
console.log(result)
this.playlistTitle = result.title this.playlistTitle = result.title
this.playlistItems = result.items this.playlistItems = result.items
this.videoCount = result.estimatedItemCount this.videoCount = result.estimatedItemCount
@ -307,7 +304,7 @@ export default Vue.extend({
this.isLoading = false this.isLoading = false
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Local API Error (Click to copy)') const errorMessage = this.$t('Local API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err}`, message: `${errorMessage}: ${err}`,
@ -336,9 +333,6 @@ export default Vue.extend({
} }
this.invidiousGetPlaylistInfo(payload).then((result) => { this.invidiousGetPlaylistInfo(payload).then((result) => {
console.log('done')
console.log(result)
this.playlistTitle = result.title this.playlistTitle = result.title
this.videoCount = result.videoCount this.videoCount = result.videoCount
this.channelName = result.author this.channelName = result.author
@ -348,7 +342,7 @@ export default Vue.extend({
this.isLoading = false this.isLoading = false
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Invidious API Error (Click to copy)') const errorMessage = this.$t('Invidious API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err}`, message: `${errorMessage}: ${err}`,

View File

@ -20,7 +20,7 @@ activeLocales.forEach((locale) => {
const doc = yaml.load(fs.readFileSync(`${fileLocation}${locale}.yaml`)) const doc = yaml.load(fs.readFileSync(`${fileLocation}${locale}.yaml`))
messages[locale] = doc messages[locale] = doc
} catch (e) { } catch (e) {
console.log(e) console.error(e)
} }
}) })

View File

@ -46,7 +46,7 @@ const actions = {
/* eslint-disable-next-line */ /* eslint-disable-next-line */
const fileLocation = payload.isDev ? './static/' : `${__dirname}/static/` const fileLocation = payload.isDev ? './static/' : `${__dirname}/static/`
if (fs.existsSync(`${fileLocation}${fileName}`)) { if (fs.existsSync(`${fileLocation}${fileName}`)) {
console.log('reading static file for invidious instances') console.warn('reading static file for invidious instances')
const fileData = fs.readFileSync(`${fileLocation}${fileName}`) const fileData = fs.readFileSync(`${fileLocation}${fileName}`)
instances = JSON.parse(fileData).map((entry) => { instances = JSON.parse(fileData).map((entry) => {
return entry.url return entry.url
@ -98,8 +98,7 @@ const actions = {
dispatch('invidiousAPICall', payload).then((response) => { dispatch('invidiousAPICall', payload).then((response) => {
resolve(response) resolve(response)
}).catch((xhr) => { }).catch((xhr) => {
console.log('found an error') console.error(xhr)
console.log(xhr)
commit('toggleIsGetChannelInfoRunning') commit('toggleIsGetChannelInfoRunning')
reject(xhr) reject(xhr)
}) })
@ -111,8 +110,7 @@ const actions = {
dispatch('invidiousAPICall', payload).then((response) => { dispatch('invidiousAPICall', payload).then((response) => {
resolve(response) resolve(response)
}).catch((xhr) => { }).catch((xhr) => {
console.log('found an error') console.error(xhr)
console.log(xhr)
commit('toggleIsGetChannelInfoRunning') commit('toggleIsGetChannelInfoRunning')
reject(xhr) reject(xhr)
}) })
@ -130,8 +128,7 @@ const actions = {
dispatch('invidiousAPICall', payload).then((response) => { dispatch('invidiousAPICall', payload).then((response) => {
resolve(response) resolve(response)
}).catch((xhr) => { }).catch((xhr) => {
console.log('found an error') console.error(xhr)
console.log(xhr)
reject(xhr) reject(xhr)
}) })
}) })

View File

@ -337,7 +337,7 @@ const actions = {
}) })
const response = await fetch(url).catch((error) => { const response = await fetch(url).catch((error) => {
console.log(error) console.error(error)
dispatch('showToast', { dispatch('showToast', {
message: errorMessage message: errorMessage
}) })
@ -347,7 +347,7 @@ const actions = {
const chunks = [] const chunks = []
const handleError = (err) => { const handleError = (err) => {
console.log(err) console.error(err)
dispatch('showToast', { dispatch('showToast', {
message: errorMessage message: errorMessage
}) })
@ -1128,8 +1128,6 @@ const actions = {
message: openingToast message: openingToast
}) })
console.log(executable, args)
const { ipcRenderer } = require('electron') const { ipcRenderer } = require('electron')
ipcRenderer.send(IpcChannels.OPEN_IN_EXTERNAL_PLAYER, { executable, args }) ipcRenderer.send(IpcChannels.OPEN_IN_EXTERNAL_PLAYER, { executable, args })
} }

View File

@ -17,10 +17,8 @@ const getters = {}
const actions = { const actions = {
ytSearch ({ commit, dispatch, rootState }, payload) { ytSearch ({ commit, dispatch, rootState }, payload) {
console.log('Performing search please wait...')
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (state.isYtSearchRunning) { if (state.isYtSearchRunning) {
console.log('search is running. please try again')
resolve(false) resolve(false)
} }
@ -90,27 +88,23 @@ const actions = {
const query = filter || payload.query const query = filter || payload.query
ytsr(query, payload.options).then((result) => { ytsr(query, payload.options).then((result) => {
console.log(result)
console.log('done')
resolve(result) resolve(result)
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
reject(err) reject(err)
}).finally(() => { }).finally(() => {
commit('toggleIsYtSearchRunning') commit('toggleIsYtSearchRunning')
}) })
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
commit('toggleIsYtSearchRunning') commit('toggleIsYtSearchRunning')
reject(err) reject(err)
}) })
} else { } else {
ytsr(payload.query, payload.options).then((result) => { ytsr(payload.query, payload.options).then((result) => {
console.log(result)
console.log('done')
resolve(result) resolve(result)
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
reject(err) reject(err)
}).finally(() => { }).finally(() => {
commit('toggleIsYtSearchRunning') commit('toggleIsYtSearchRunning')
@ -172,9 +166,6 @@ const actions = {
searchSettings = rootState.utils.searchSettings searchSettings = rootState.utils.searchSettings
} }
console.log(searchSettings)
console.log(filter)
if (searchSettings.sortBy !== 'relevance') { if (searchSettings.sortBy !== 'relevance') {
let filterValue let filterValue
switch (searchSettings.sortBy) { switch (searchSettings.sortBy) {
@ -192,8 +183,6 @@ const actions = {
filter = await ytsr.getFilters(filterUrl, options) filter = await ytsr.getFilters(filterUrl, options)
} }
console.log(`Current ref: ${filterUrl}`)
if (searchSettings.duration !== '') { if (searchSettings.duration !== '') {
let filterValue = null let filterValue = null
if (searchSettings.duration === 'short') { if (searchSettings.duration === 'short') {
@ -206,8 +195,6 @@ const actions = {
filter = await ytsr.getFilters(filterUrl, options) filter = await ytsr.getFilters(filterUrl, options)
} }
console.log(`Current ref: ${filterUrl}`)
if (searchSettings.time !== '') { if (searchSettings.time !== '') {
let filterValue = null let filterValue = null
@ -233,16 +220,12 @@ const actions = {
filter = await ytsr.getFilters(filterUrl, options) filter = await ytsr.getFilters(filterUrl, options)
} }
console.log(`Current ref: ${filterUrl}`)
if (searchSettings.type !== 'all') { if (searchSettings.type !== 'all') {
const filterValue = searchSettings.type.charAt(0).toUpperCase() + searchSettings.type.slice(1) const filterValue = searchSettings.type.charAt(0).toUpperCase() + searchSettings.type.slice(1)
filterUrl = filter.get('Type').get(filterValue).url filterUrl = filter.get('Type').get(filterValue).url
filter = await ytsr.getFilters(filterUrl, options) filter = await ytsr.getFilters(filterUrl, options)
} }
console.log(`Current ref: ${filterUrl}`)
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
resolve(filterUrl) resolve(filterUrl)
}) })
@ -250,8 +233,6 @@ const actions = {
ytGetPlaylistInfo ({ rootState }, playlistId) { ytGetPlaylistInfo ({ rootState }, playlistId) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
console.log(playlistId)
console.log('Getting playlist info please wait...')
let agent = null let agent = null
const settings = rootState.settings const settings = rootState.settings
const useProxy = settings.useProxy const useProxy = settings.useProxy
@ -310,7 +291,6 @@ const actions = {
ytGetVideoInformation ({ rootState }, videoId) { ytGetVideoInformation ({ rootState }, videoId) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
console.log('Getting video info please wait...')
let agent = null let agent = null
const settings = rootState.settings const settings = rootState.settings
const useProxy = settings.useProxy const useProxy = settings.useProxy

View File

@ -304,7 +304,7 @@ export default Vue.extend({
this.isLoading = false this.isLoading = false
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Local API Error (Click to copy)') const errorMessage = this.$t('Local API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err}`, message: `${errorMessage}: ${err}`,
@ -336,7 +336,7 @@ export default Vue.extend({
this.videoContinuationString = response.continuation this.videoContinuationString = response.continuation
this.isElementListLoading = false this.isElementListLoading = false
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Local API Error (Click to copy)') const errorMessage = this.$t('Local API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err}`, message: `${errorMessage}: ${err}`,
@ -361,7 +361,7 @@ export default Vue.extend({
this.latestVideos = this.latestVideos.concat(response.items) this.latestVideos = this.latestVideos.concat(response.items)
this.videoContinuationString = response.continuation this.videoContinuationString = response.continuation
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Local API Error (Click to copy)') const errorMessage = this.$t('Local API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err}`, message: `${errorMessage}: ${err}`,
@ -383,7 +383,6 @@ export default Vue.extend({
return return
} }
console.log(response)
const channelName = response.author const channelName = response.author
const channelId = response.authorId const channelId = response.authorId
this.channelName = channelName this.channelName = channelName
@ -416,7 +415,7 @@ export default Vue.extend({
this.isLoading = false this.isLoading = false
}).catch((err) => { }).catch((err) => {
this.setErrorMessage(err.responseJSON.error) this.setErrorMessage(err.responseJSON.error)
console.log(err) console.error(err)
const errorMessage = this.$t('Invidious API Error (Click to copy)') const errorMessage = this.$t('Invidious API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err.responseJSON.error}`, message: `${errorMessage}: ${err.responseJSON.error}`,
@ -444,7 +443,7 @@ export default Vue.extend({
this.latestVideosPage++ this.latestVideosPage++
this.isElementListLoading = false this.isElementListLoading = false
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Local API Error (Click to copy)') const errorMessage = this.$t('Local API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err}`, message: `${errorMessage}: ${err}`,
@ -463,7 +462,6 @@ export default Vue.extend({
return return
} }
console.log(response)
this.latestPlaylists = response.items.map((item) => { this.latestPlaylists = response.items.map((item) => {
item.proxyThumbnail = false item.proxyThumbnail = false
return item return item
@ -471,7 +469,7 @@ export default Vue.extend({
this.playlistContinuationString = response.continuation this.playlistContinuationString = response.continuation
this.isElementListLoading = false this.isElementListLoading = false
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Local API Error (Click to copy)') const errorMessage = this.$t('Local API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err}`, message: `${errorMessage}: ${err}`,
@ -493,11 +491,10 @@ export default Vue.extend({
getPlaylistsLocalMore: function () { getPlaylistsLocalMore: function () {
ytch.getChannelPlaylistsMore({ continuation: this.playlistContinuationString }).then((response) => { ytch.getChannelPlaylistsMore({ continuation: this.playlistContinuationString }).then((response) => {
console.log(response)
this.latestPlaylists = this.latestPlaylists.concat(response.items) this.latestPlaylists = this.latestPlaylists.concat(response.items)
this.playlistContinuationString = response.continuation this.playlistContinuationString = response.continuation
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Local API Error (Click to copy)') const errorMessage = this.$t('Local API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err}`, message: `${errorMessage}: ${err}`,
@ -523,7 +520,7 @@ export default Vue.extend({
this.latestPlaylists = response.playlists this.latestPlaylists = response.playlists
this.isElementListLoading = false this.isElementListLoading = false
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Invidious API Error (Click to copy)') const errorMessage = this.$t('Invidious API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err.responseJSON.error}`, message: `${errorMessage}: ${err.responseJSON.error}`,
@ -545,7 +542,7 @@ export default Vue.extend({
getPlaylistsInvidiousMore: function () { getPlaylistsInvidiousMore: function () {
if (this.playlistContinuationString === null) { if (this.playlistContinuationString === null) {
console.log('There are no more playlists available for this channel') console.warn('There are no more playlists available for this channel')
return return
} }
@ -566,7 +563,7 @@ export default Vue.extend({
this.latestPlaylists = this.latestPlaylists.concat(response.playlists) this.latestPlaylists = this.latestPlaylists.concat(response.playlists)
this.isElementListLoading = false this.isElementListLoading = false
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Invidious API Error (Click to copy)') const errorMessage = this.$t('Invidious API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err.responseJSON.error}`, message: `${errorMessage}: ${err.responseJSON.error}`,
@ -727,12 +724,11 @@ export default Vue.extend({
searchChannelLocal: function () { searchChannelLocal: function () {
if (this.searchContinuationString === '') { if (this.searchContinuationString === '') {
ytch.searchChannel({ channelId: this.id, channelIdType: this.idType, query: this.lastSearchQuery }).then((response) => { ytch.searchChannel({ channelId: this.id, channelIdType: this.idType, query: this.lastSearchQuery }).then((response) => {
console.log(response)
this.searchResults = response.items this.searchResults = response.items
this.isElementListLoading = false this.isElementListLoading = false
this.searchContinuationString = response.continuation this.searchContinuationString = response.continuation
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Local API Error (Click to copy)') const errorMessage = this.$t('Local API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err}`, message: `${errorMessage}: ${err}`,
@ -752,12 +748,11 @@ export default Vue.extend({
}) })
} else { } else {
ytch.searchChannelMore({ continuation: this.searchContinuationString }).then((response) => { ytch.searchChannelMore({ continuation: this.searchContinuationString }).then((response) => {
console.log(response)
this.searchResults = this.searchResults.concat(response.items) this.searchResults = this.searchResults.concat(response.items)
this.isElementListLoading = false this.isElementListLoading = false
this.searchContinuationString = response.continuation this.searchContinuationString = response.continuation
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Local API Error (Click to copy)') const errorMessage = this.$t('Local API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err}`, message: `${errorMessage}: ${err}`,
@ -785,7 +780,7 @@ export default Vue.extend({
this.isElementListLoading = false this.isElementListLoading = false
this.searchPage++ this.searchPage++
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Invidious API Error (Click to copy)') const errorMessage = this.$t('Invidious API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err}`, message: `${errorMessage}: ${err}`,

View File

@ -67,9 +67,6 @@ export default Vue.extend({
this.isLoading = true this.isLoading = true
this.ytGetPlaylistInfo(this.playlistId).then((result) => { this.ytGetPlaylistInfo(this.playlistId).then((result) => {
console.log('done')
console.log(result)
this.infoData = { this.infoData = {
id: result.id, id: result.id,
title: result.title, title: result.title,
@ -107,9 +104,9 @@ export default Vue.extend({
this.isLoading = false this.isLoading = false
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
if (this.backendPreference === 'local' && this.backendFallback) { if (this.backendPreference === 'local' && this.backendFallback) {
console.log('Falling back to Invidious API') console.warn('Falling back to Invidious API')
this.getPlaylistInvidious() this.getPlaylistInvidious()
} else { } else {
this.isLoading = false this.isLoading = false
@ -126,9 +123,6 @@ export default Vue.extend({
} }
this.invidiousGetPlaylistInfo(payload).then((result) => { this.invidiousGetPlaylistInfo(payload).then((result) => {
console.log('done')
console.log(result)
this.infoData = { this.infoData = {
id: result.playlistId, id: result.playlistId,
title: result.title, title: result.title,
@ -155,9 +149,9 @@ export default Vue.extend({
this.isLoading = false this.isLoading = false
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
if (this.backendPreference === 'invidious' && this.backendFallback) { if (this.backendPreference === 'invidious' && this.backendFallback) {
console.log('Error getting data with Invidious, falling back to local backend') console.warn('Error getting data with Invidious, falling back to local backend')
this.getPlaylistLocal() this.getPlaylistLocal()
} else { } else {
this.isLoading = false this.isLoading = false

View File

@ -41,7 +41,7 @@ export default Vue.extend({
this.isLoading = true this.isLoading = true
const result = await this.invidiousAPICall(searchPayload) const result = await this.invidiousAPICall(searchPayload)
.catch((err) => { .catch((err) => {
console.log(err) console.error(err)
}) })
if (!result) { if (!result) {
@ -49,8 +49,6 @@ export default Vue.extend({
return return
} }
console.log(result)
this.shownResults = result.filter((item) => { this.shownResults = result.filter((item) => {
return item.type === 'video' || item.type === 'shortVideo' || item.type === 'channel' || item.type === 'playlist' return item.type === 'video' || item.type === 'shortVideo' || item.type === 'channel' || item.type === 'playlist'
}) })

View File

@ -17,9 +17,6 @@ export default Vue.extend({
return this.$store.getters.getProfileList return this.$store.getters.getProfileList
} }
}, },
mounted: function () {
console.log(this.profileList)
},
methods: { methods: {
newProfile: function () { newProfile: function () {
this.$router.push({ this.$router.push({

View File

@ -72,7 +72,6 @@ export default Vue.extend({
}, },
mounted: function () { mounted: function () {
this.query = this.$route.params.query this.query = this.$route.params.query
console.log(this.$route)
this.searchSettings = { this.searchSettings = {
sortBy: this.$route.query.sortBy, sortBy: this.$route.query.sortBy,
@ -100,8 +99,6 @@ export default Vue.extend({
this.isLoading = true this.isLoading = true
if (sameSearch.length > 0) { if (sameSearch.length > 0) {
console.log(sameSearch)
// Replacing the data right away causes a strange error where the data // Replacing the data right away causes a strange error where the data
// Shown is mixed from 2 different search results. So we'll wait a moment // Shown is mixed from 2 different search results. So we'll wait a moment
// Before showing the results. // Before showing the results.
@ -129,7 +126,6 @@ export default Vue.extend({
payload.options.safeSearch = this.showFamilyFriendlyOnly payload.options.safeSearch = this.showFamilyFriendlyOnly
this.ytSearch(payload).then((result) => { this.ytSearch(payload).then((result) => {
console.log(result)
if (!result) { if (!result) {
return return
} }
@ -201,7 +197,7 @@ export default Vue.extend({
this.$store.commit('addToSessionSearchHistory', historyPayload) this.$store.commit('addToSessionSearchHistory', historyPayload)
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Local API Error (Click to copy)') const errorMessage = this.$t('Local API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err}`, message: `${errorMessage}: ${err}`,
@ -225,7 +221,6 @@ export default Vue.extend({
if (this.searchPage === 1) { if (this.searchPage === 1) {
this.isLoading = true this.isLoading = true
} }
console.log(payload)
const searchPayload = { const searchPayload = {
resource: 'search', resource: 'search',
@ -247,14 +242,10 @@ export default Vue.extend({
this.apiUsed = 'invidious' this.apiUsed = 'invidious'
console.log(result)
const returnData = result.filter((item) => { const returnData = result.filter((item) => {
return item.type === 'video' || item.type === 'channel' || item.type === 'playlist' return item.type === 'video' || item.type === 'channel' || item.type === 'playlist'
}) })
console.log(returnData)
if (this.searchPage !== 1) { if (this.searchPage !== 1) {
this.shownResults = this.shownResults.concat(returnData) this.shownResults = this.shownResults.concat(returnData)
} else { } else {
@ -273,7 +264,7 @@ export default Vue.extend({
this.$store.commit('addToSessionSearchHistory', historyPayload) this.$store.commit('addToSessionSearchHistory', historyPayload)
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Invidious API Error (Click to copy)') const errorMessage = this.$t('Invidious API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err}`, message: `${errorMessage}: ${err}`,
@ -304,8 +295,6 @@ export default Vue.extend({
} }
} }
console.log(payload)
if (this.apiUsed === 'local') { if (this.apiUsed === 'local') {
if (this.amountOfResults <= this.shownResults.length) { if (this.amountOfResults <= this.shownResults.length) {
this.showToast({ this.showToast({

View File

@ -254,7 +254,7 @@ export default Vue.extend({
resolve(videos) resolve(videos)
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Local API Error (Click to copy)') const errorMessage = this.$t('Local API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err}`, message: `${errorMessage}: ${err}`,
@ -313,7 +313,7 @@ export default Vue.extend({
resolve(items) resolve(items)
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
if (err.toString().match(/404/)) { if (err.toString().match(/404/)) {
this.errorChannels.push(channel) this.errorChannels.push(channel)
resolve([]) resolve([])
@ -365,7 +365,7 @@ export default Vue.extend({
return video return video
}))) })))
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Invidious API Error (Click to copy)') const errorMessage = this.$t('Invidious API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err.responseText}`, message: `${errorMessage}: ${err.responseText}`,
@ -416,7 +416,7 @@ export default Vue.extend({
return video return video
}))) })))
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Invidious API Error (Click to copy)') const errorMessage = this.$t('Invidious API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err}`, message: `${errorMessage}: ${err}`,

View File

@ -107,7 +107,6 @@ export default Vue.extend({
getTrendingInfoLocal: function () { getTrendingInfoLocal: function () {
this.isLoading = true this.isLoading = true
console.log('getting local trending')
const param = { const param = {
parseCreatorOnRise: false, parseCreatorOnRise: false,
page: this.currentTab, page: this.currentTab,
@ -126,7 +125,7 @@ export default Vue.extend({
}).then(() => { }).then(() => {
document.querySelector(`#${this.currentTab}Tab`).focus() document.querySelector(`#${this.currentTab}Tab`).focus()
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Local API Error (Click to copy)') const errorMessage = this.$t('Local API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err}`, message: `${errorMessage}: ${err}`,
@ -172,8 +171,6 @@ export default Vue.extend({
return return
} }
console.log(result)
const returnData = result.filter((item) => { const returnData = result.filter((item) => {
return item.type === 'video' || item.type === 'channel' || item.type === 'playlist' return item.type === 'video' || item.type === 'channel' || item.type === 'playlist'
}) })
@ -185,7 +182,7 @@ export default Vue.extend({
}).then(() => { }).then(() => {
document.querySelector(`#${this.currentTab}Tab`).focus() document.querySelector(`#${this.currentTab}Tab`).focus()
}).catch((err) => { }).catch((err) => {
console.log(err) console.error(err)
const errorMessage = this.$t('Invidious API Error (Click to copy)') const errorMessage = this.$t('Invidious API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err.responseText}`, message: `${errorMessage}: ${err.responseText}`,

View File

@ -245,8 +245,6 @@ export default Vue.extend({
this.ytGetVideoInformation(this.videoId) this.ytGetVideoInformation(this.videoId)
.then(async result => { .then(async result => {
console.log(result)
const playabilityStatus = result.player_response.playabilityStatus const playabilityStatus = result.player_response.playabilityStatus
if (playabilityStatus.status === 'UNPLAYABLE') { if (playabilityStatus.status === 'UNPLAYABLE') {
const errorScreen = playabilityStatus.errorScreen.playerErrorMessageRenderer const errorScreen = playabilityStatus.errorScreen.playerErrorMessageRenderer
@ -284,7 +282,6 @@ export default Vue.extend({
if ('id' in result.videoDetails.author) { if ('id' in result.videoDetails.author) {
this.channelId = result.player_response.videoDetails.channelId this.channelId = result.player_response.videoDetails.channelId
this.channelName = result.videoDetails.author.name this.channelName = result.videoDetails.author.name
console.log(result)
if (result.videoDetails.author.thumbnails.length > 0) { if (result.videoDetails.author.thumbnails.length > 0) {
this.channelThumbnail = result.videoDetails.author.thumbnails[0].url this.channelThumbnail = result.videoDetails.author.thumbnails[0].url
} }
@ -607,7 +604,7 @@ export default Vue.extend({
this.copyToClipboard({ content: err }) this.copyToClipboard({ content: err })
} }
}) })
console.log(err) console.error(err)
if (this.backendPreference === 'local' && this.backendFallback && !err.toString().includes('private')) { if (this.backendPreference === 'local' && this.backendFallback && !err.toString().includes('private')) {
this.showToast({ this.showToast({
message: this.$t('Falling back to Invidious API') message: this.$t('Falling back to Invidious API')
@ -629,8 +626,6 @@ export default Vue.extend({
this.invidiousGetVideoInformation(this.videoId) this.invidiousGetVideoInformation(this.videoId)
.then(result => { .then(result => {
console.log(result)
if (result.error) { if (result.error) {
throw new Error(result.error) throw new Error(result.error)
} }
@ -784,6 +779,7 @@ export default Vue.extend({
this.isLoading = false this.isLoading = false
}) })
.catch(err => { .catch(err => {
console.error(err)
const errorMessage = this.$t('Invidious API Error (Click to copy)') const errorMessage = this.$t('Invidious API Error (Click to copy)')
this.showToast({ this.showToast({
message: `${errorMessage}: ${err.responseText}`, message: `${errorMessage}: ${err.responseText}`,
@ -792,7 +788,7 @@ export default Vue.extend({
this.copyToClipboard({ content: err.responseText }) this.copyToClipboard({ content: err.responseText })
} }
}) })
console.log(err) console.error(err)
if (this.backendPreference === 'invidious' && this.backendFallback) { if (this.backendPreference === 'invidious' && this.backendFallback) {
this.showToast({ this.showToast({
message: this.$t('Falling back to Local API') message: this.$t('Falling back to Local API')
@ -894,8 +890,6 @@ export default Vue.extend({
return video.videoId === this.videoId return video.videoId === this.videoId
}) })
console.log(historyIndex)
if (!this.isLive) { if (!this.isLive) {
if (this.timestamp) { if (this.timestamp) {
if (this.timestamp < 0) { if (this.timestamp < 0) {
@ -963,7 +957,7 @@ export default Vue.extend({
this.copyToClipboard({ content: err }) this.copyToClipboard({ content: err })
} }
}) })
console.log(err) console.error(err)
if (!process.env.IS_ELECTRON || (this.backendPreference === 'local' && this.backendFallback)) { if (!process.env.IS_ELECTRON || (this.backendPreference === 'local' && this.backendFallback)) {
this.showToast({ this.showToast({
message: this.$t('Falling back to Invidious API') message: this.$t('Falling back to Invidious API')
@ -1162,14 +1156,14 @@ export default Vue.extend({
}, },
handleVideoError: function (error) { handleVideoError: function (error) {
console.log(error) console.error(error)
if (this.isLive) { if (this.isLive) {
return return
} }
if (error.code === 4) { if (error.code === 4) {
if (this.activeFormat === 'dash') { if (this.activeFormat === 'dash') {
console.log( console.warn(
'Unable to play dash formats. Reverting to legacy formats...' 'Unable to play dash formats. Reverting to legacy formats...'
) )
this.enableLegacyFormat() this.enableLegacyFormat()

View File

@ -1,3 +1,4 @@
/* eslint-disable no-console */
// This is the service worker with the Advanced caching // This is the service worker with the Advanced caching
const CACHE = 'pwabuilder-adv-cache' const CACHE = 'pwabuilder-adv-cache'
@ -110,7 +111,7 @@ function cacheFirstFetch(event) {
return return
} }
console.log('[PWA Builder] Network request failed and no cache.' + error) console.error('[PWA Builder] Network request failed and no cache.' + error)
// Use the precached offline page as fallback // Use the precached offline page as fallback
return caches.open(CACHE).then(function (cache) { return caches.open(CACHE).then(function (cache) {
cache.match(offlineFallbackPage) cache.match(offlineFallbackPage)
@ -130,7 +131,7 @@ function networkFirstFetch(event) {
return response return response
}) })
.catch(function (error) { .catch(function (error) {
console.log('[PWA Builder] Network request Failed. Serving content from cache: ' + error) console.error('[PWA Builder] Network request Failed. Serving content from cache: ' + error)
return fromCache(event.request) return fromCache(event.request)
}) })
) )