-
Notifications
You must be signed in to change notification settings - Fork 23
ES6 the Site #41
base: master
Are you sure you want to change the base?
ES6 the Site #41
Conversation
@@ -23,9 +23,6 @@ iframe { | |||
margin: 0 auto; | |||
display: block; | |||
border: 1px solid #ccc; | |||
seamless; | |||
frameborder: 0; | |||
scrolling: no; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to https://caniuse.com/ all these attributes are not supported by any browser any more
var dm = decimals + 1 || 3; | ||
var sizes = ['bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; | ||
var i = Math.floor(Math.log(bytes) / Math.log(k)); | ||
// https://stackoverflow.com/questions/15900485/correct-way-to-convert-size-in-bytes-to-kb-mb-gb-in-javascript |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use HTTPS
if (navigator.platform.indexOf('Win') >= 0){ | ||
if (navigator.userAgent.indexOf("WOW64") === -1 && navigator.userAgent.indexOf("Win64") === -1 ){ | ||
function getPlatform() { | ||
const { platform, userAgent } = navigator; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const setupPageControl = (container, pageType) => { | ||
const buttons = document.querySelectorAll(container + ' .btn-' + pageType); | ||
for (let i = 0; i < buttons.length; i++) { | ||
buttons[i].addEventListener('click', () => { | ||
if (!this.classList.contains('active')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you verified that this
still works? IIRC, this
does not exist in arrow functions, but it does in normal functions like how it was before. I don't really see a reason for changing all functions into arrow functions in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted the change, I guess there isn't a strong reason to really use arrow functions in most places
No description provided.