Skip to content

Commit

Permalink
Add basic style
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Aug 26, 2016
1 parent a039ab5 commit b42341a
Show file tree
Hide file tree
Showing 9 changed files with 529 additions and 6 deletions.
20 changes: 20 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Table of contents

* [JS MythBusters](/README.md)
* [Array]
* [Reallocation](/array/reallocation.md)
* [Array.pop() better than Array.shift()]
* [All you need to know about arguments]
* [Date]
* [Create timestamps with Date.now()]
* [Error]
* [Avoid try/catch]
* [Function]
* [Make Your Constructors new-Agnostic]
* [Avoid .bind, is slower]
* [RegexEp]
* [Use RegExp in cases with sense]
* [Focus RegExp on failing faster]
* [Use the correct RegExp method]
* [String]
* [Instead of String.concat, use '+=']
1 change: 1 addition & 0 deletions docs/assets/css/build.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions docs/assets/js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
function ready (fn) {
if (document.readyState === 'complete') {
return fn()
} else if (document.addEventListener) {
document.addEventListener('DOMContentLoaded', fn)
} else {
document.attachEvent('onreadystatechange', function () {
if (document.readyState === 'interactive') fn()
})
}
}

function addClass (el, className) {
if (el.classList) el.classList.add(className)
else el.className += ' ' + className
}

ready(function () {
addClass(document.body, 'hack')
addClass(document.body, 'dark')
})
Loading

0 comments on commit b42341a

Please sign in to comment.