diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-09-25 18:19:42 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-10-01 17:16:09 +0200 |
commit | b9bc2417e7a8dc81feb0abe20359bedaf864f790 (patch) | |
tree | 61b47fbf37c1d168da8625224debde9e6a985348 /core/src/Polyfill | |
parent | 7fb651235128dcbca8a6683b5cdafdf835f46300 (diff) | |
download | nextcloud-server-b9bc2417e7a8dc81feb0abe20359bedaf864f790.tar.gz nextcloud-server-b9bc2417e7a8dc81feb0abe20359bedaf864f790.zip |
Comply to eslint
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core/src/Polyfill')
-rw-r--r-- | core/src/Polyfill/console.js | 13 | ||||
-rw-r--r-- | core/src/Polyfill/tooltip.js | 14 | ||||
-rw-r--r-- | core/src/Polyfill/windows-phone.js | 10 |
3 files changed, 19 insertions, 18 deletions
diff --git a/core/src/Polyfill/console.js b/core/src/Polyfill/console.js index 72a1165e437..faa32c457c6 100644 --- a/core/src/Polyfill/console.js +++ b/core/src/Polyfill/console.js @@ -1,4 +1,5 @@ -/* +/* eslint-disable no-console */ +/** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at> @@ -19,13 +20,13 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (typeof console === "undefined" || typeof console.log === "undefined") { +if (typeof console === 'undefined' || typeof console.log === 'undefined') { if (!window.console) { - window.console = {}; + window.console = {} } - const noOp = () => {}; - const methods = ['log', 'debug', 'warn', 'info', 'error', 'assert', 'time', 'timeEnd']; + const noOp = () => {} + const methods = ['log', 'debug', 'warn', 'info', 'error', 'assert', 'time', 'timeEnd'] for (var i = 0; i < methods.length; i++) { - console[methods[i]] = noOp; + console[methods[i]] = noOp } } diff --git a/core/src/Polyfill/tooltip.js b/core/src/Polyfill/tooltip.js index 0ad3686d016..08cc58c338c 100644 --- a/core/src/Polyfill/tooltip.js +++ b/core/src/Polyfill/tooltip.js @@ -22,16 +22,16 @@ $.prototype.tooltip = (function(tooltip) { return function(config) { try { - return tooltip.call(this, config); + return tooltip.call(this, config) } catch (ex) { if (ex instanceof TypeError && config === 'destroy') { - console.error('Deprecated call $.tooltip(\'destroy\') has been deprecated and should be removed'); - return tooltip.call(this, 'dispose'); + console.error('Deprecated call $.tooltip(\'destroy\') has been deprecated and should be removed') + return tooltip.call(this, 'dispose') } if (ex instanceof TypeError && config === 'fixTitle') { - console.error('Deprecated call $.tooltip(\'fixTitle\') has been deprecated and should be removed'); - return tooltip.call(this, '_fixTitle'); + console.error('Deprecated call $.tooltip(\'fixTitle\') has been deprecated and should be removed') + return tooltip.call(this, '_fixTitle') } } - }; -})($.prototype.tooltip); + } +})($.prototype.tooltip) diff --git a/core/src/Polyfill/windows-phone.js b/core/src/Polyfill/windows-phone.js index 3d59074856b..983e412e453 100644 --- a/core/src/Polyfill/windows-phone.js +++ b/core/src/Polyfill/windows-phone.js @@ -20,10 +20,10 @@ */ // fix device width on windows phone -if ("-ms-user-select" in document.documentElement.style && navigator.userAgent.match(/IEMobile\/10\.0/)) { - const msViewportStyle = document.createElement("style"); +if ('-ms-user-select' in document.documentElement.style && navigator.userAgent.match(/IEMobile\/10\.0/)) { + const msViewportStyle = document.createElement('style') msViewportStyle.appendChild( - document.createTextNode("@-ms-viewport{width:auto!important}") - ); - document.getElementsByTagName("head")[0].appendChild(msViewportStyle); + document.createTextNode('@-ms-viewport{width:auto!important}') + ) + document.getElementsByTagName('head')[0].appendChild(msViewportStyle) } |