@@ -90,15 +90,17 @@ const addToList = (distname, selectionname) => {
90
90
// if so, present toast-message
91
91
M . Toast . dismissAll ( ) ;
92
92
M . toast ( {
93
- html : 'Item already on list!' , classes : 'toastColour'
93
+ html : 'Item already on list!' ,
94
+ classes : 'toastColour'
94
95
} ) ;
95
96
} else {
96
97
// if not add app to existing OS
97
98
userList [ distname ] [ selectionname ] = osObj [ selection ] ;
98
99
// confirm item added with toast msg
99
100
M . Toast . dismissAll ( ) ;
100
101
M . toast ( {
101
- html : 'Added to list!' , classes : 'toastColour'
102
+ html : 'Added to list!' ,
103
+ classes : 'toastColour'
102
104
} ) ;
103
105
addToDataForFileOutput ( choice , selectionname ) ;
104
106
}
@@ -110,7 +112,8 @@ const addToList = (distname, selectionname) => {
110
112
// confirm item added with toast msg
111
113
M . Toast . dismissAll ( ) ;
112
114
M . toast ( {
113
- html : 'Added to list!' , classes : 'toastColour'
115
+ html : 'Added to list!' ,
116
+ classes : 'toastColour'
114
117
} ) ;
115
118
addToDataForFileOutput ( choice , selectionname ) ;
116
119
}
@@ -167,28 +170,31 @@ const addToSidebar = (osinfo, selectioninfo) => {
167
170
document . getElementById ( "sideOutput" ) . appendChild ( sideElement ) ;
168
171
M . Toast . dismissAll ( ) ;
169
172
M . toast ( {
170
- html : 'Added to list!' , classes : 'toastColour'
173
+ html : 'Added to list!' ,
174
+ classes : 'toastColour'
171
175
} ) ;
172
176
}
173
177
} ;
174
178
175
179
// clear list
176
180
const clearSidebar = ( ) => {
177
181
if ( sideCount > 0 ) {
178
- document . getElementById ( "sideOutput" ) . innerHTML = "" ;
179
- document . getElementById ( "sideTrigger" ) . setAttribute ( "class" , "btn-floating btn-large" ) ;
180
- document . getElementById ( "triggerEnvelope" ) . setAttribute ( "class" , "fas fa-folder-open" ) ;
181
- dataOutput = '' ;
182
- userList = { } ;
182
+ document . getElementById ( "sideOutput" ) . innerHTML = "" ;
183
+ document . getElementById ( "sideTrigger" ) . setAttribute ( "class" , "btn-floating btn-large" ) ;
184
+ document . getElementById ( "triggerEnvelope" ) . setAttribute ( "class" , "fas fa-folder-open" ) ;
185
+ dataOutput = '' ;
186
+ userList = { } ;
183
187
M . Toast . dismissAll ( ) ;
184
188
M . toast ( {
185
- html : "List cleared" , classes : 'toastColour'
189
+ html : "List cleared" ,
190
+ classes : 'toastColour'
186
191
} ) ;
187
192
sideCount = 0 ;
188
193
} else {
189
194
M . Toast . dismissAll ( ) ;
190
195
M . toast ( {
191
- html : "List already empty" , classes : 'toastColour'
196
+ html : "List already empty" ,
197
+ classes : 'toastColour'
192
198
} ) ;
193
199
}
194
200
} ;
@@ -208,19 +214,22 @@ function copyToClipboard(inputText) {
208
214
let msg = successful ? "successful" : "unsuccessful" ;
209
215
M . Toast . dismissAll ( ) ;
210
216
M . toast ( {
211
- html : 'Copy ' + msg + '!' , classes : 'toastColour'
217
+ html : 'Copy ' + msg + '!' ,
218
+ classes : 'toastColour'
212
219
} ) ;
213
220
} catch ( err ) {
214
221
M . toast ( {
215
- html : "Copy failed" , classes : 'toastColour'
222
+ html : "Copy failed" ,
223
+ classes : 'toastColour'
216
224
} ) ;
217
225
console . log ( "Copy failed" , err ) ;
218
226
}
219
227
document . body . removeChild ( textArea ) ;
220
228
} else {
221
229
M . Toast . dismissAll ( ) ;
222
230
M . toast ( {
223
- html : "Nothing to copy yet" , classes : 'toastColour'
231
+ html : "Nothing to copy yet" ,
232
+ classes : 'toastColour'
224
233
} ) ;
225
234
}
226
235
}
@@ -272,7 +281,8 @@ for (i = 0; i < toInstall.length; i++) {
272
281
if ( ! osObj ) {
273
282
M . Toast . dismissAll ( ) ;
274
283
M . toast ( {
275
- html : "Please select distro" , classes : 'toastColour'
284
+ html : "Please select distro" ,
285
+ classes : 'toastColour'
276
286
} ) ;
277
287
document . getElementById ( "outputIntro" ) . innerText = "Please select an Operating System above." ;
278
288
document . getElementById ( "outputContent" ) . innerText = "" ;
@@ -305,7 +315,8 @@ document.getElementById("saveOutput").addEventListener("click", function () {
305
315
} else {
306
316
M . Toast . dismissAll ( ) ;
307
317
M . toast ( {
308
- html : 'Nothing to add yet' , classes : 'toastColour'
318
+ html : 'Nothing to add yet' ,
319
+ classes : 'toastColour'
309
320
} ) ;
310
321
}
311
322
} ) ;
@@ -323,7 +334,8 @@ document.getElementById("sidebarDownload").addEventListener("click", function ()
323
334
} else {
324
335
M . Toast . dismissAll ( ) ;
325
336
M . toast ( {
326
- html : 'List is empty' , classes : 'toastColour'
337
+ html : 'List is empty' ,
338
+ classes : 'toastColour'
327
339
} ) ;
328
340
}
329
341
} ) ;
0 commit comments