aboutsummaryrefslogtreecommitdiff
path: root/docs/assets/js
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2015-04-26 13:53:45 +0300
committerXhmikosR <[email protected]>2015-04-28 11:03:37 +0300
commit3e7ca3bbc8eaa60013d4ab9f2edd42f6dcd8dd4b (patch)
tree968eee9693cf578b4f3f2991f4a482019cf4cf43 /docs/assets/js
parent4e027718a816f50e9d87acd890644b8f0ecce856 (diff)
downloadbootstrap-3e7ca3bbc8eaa60013d4ab9f2edd42f6dcd8dd4b.tar.xz
bootstrap-3e7ca3bbc8eaa60013d4ab9f2edd42f6dcd8dd4b.zip
Minor lint tweaks.
Diffstat (limited to 'docs/assets/js')
-rw-r--r--docs/assets/js/src/customizer.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/docs/assets/js/src/customizer.js b/docs/assets/js/src/customizer.js
index d38a71724..8eac4c200 100644
--- a/docs/assets/js/src/customizer.js
+++ b/docs/assets/js/src/customizer.js
@@ -17,7 +17,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
' * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n' +
' */\n\n'
- var supportsFile = (window.File && window.FileReader && window.FileList && window.Blob)
+ var supportsFile = window.File && window.FileReader && window.FileList && window.Blob
var importDropTarget = $('#import-drop-target')
function showError(msg, err) {
@@ -112,7 +112,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
js: $('#plugin-section input:checked').map(function () { return this.value }).toArray()
}
- if ($.isEmptyObject(data.vars) && !data.css.length && !data.js.length) return
+ if ($.isEmptyObject(data.vars) && !data.css.length && !data.js.length) return null
return data
}
@@ -241,11 +241,11 @@ window.onload = function () { // wait for load in a dumb way because B-0
// Core stylesheets like 'normalize.less' are not included in the form
// since disabling them would wreck everything, and so their 'fileInclude'
// will be 'undefined'.
- if (fileInclude || (fileInclude == null)) lessSource += __less[filename]
+ if (fileInclude || fileInclude == null) lessSource += __less[filename]
// Custom variables are added after Bootstrap variables so the custom
// ones take precedence.
- if (('variables.less' === filename) && vars) lessSource += generateCustomLess(vars)
+ if (filename === 'variables.less' && vars) lessSource += generateCustomLess(vars)
})
lessSource = lessSource.replace(/@import[^\n]*/gi, '') // strip any imports
@@ -267,8 +267,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
try {
intoResult[baseFilename + '.css'] = cw + tree.toCSS()
intoResult[baseFilename + '.min.css'] = cw + tree.toCSS({ compress: true })
- }
- catch (compileErr) {
+ } catch (compileErr) {
return promise.reject(compileErr)
}
promise.resolve()
@@ -366,7 +365,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
e.stopPropagation()
e.preventDefault()
- var file = (e.originalEvent.hasOwnProperty('dataTransfer')) ? e.originalEvent.dataTransfer.files[0] : e.originalEvent.target.files[0]
+ var file = e.originalEvent.hasOwnProperty('dataTransfer') ? e.originalEvent.dataTransfer.files[0] : e.originalEvent.target.files[0]
var reader = new FileReader()
@@ -474,7 +473,9 @@ window.onload = function () { // wait for load in a dumb way because B-0
).done(function (css, js, fonts) {
generateZip(css, js, fonts, configJson, function (blob) {
$compileBtn.removeAttr('disabled')
- setTimeout(function () { saveAs(blob, 'bootstrap.zip') }, 0)
+ setTimeout(function () {
+ saveAs(blob, 'bootstrap.zip')
+ }, 0)
})
})
})