From 196d2a39712760b7671fa2feb54e1883a97796e5 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 4 Oct 2018 14:54:35 +0200 Subject: [PATCH] remove classlist polyfill, cross browser support is good enough now --- README.md | 3 --- demo.html | 1 - lib/js/classList.js | 2 -- plugin/markdown/example.html | 1 - test/examples/math.html | 1 - 5 files changed, 8 deletions(-) delete mode 100644 lib/js/classList.js diff --git a/README.md b/README.md index 67c9654..02b570a 100644 --- a/README.md +++ b/README.md @@ -423,9 +423,6 @@ Reveal.js doesn't _rely_ on any third party scripts to work but a few optional l ```javascript Reveal.initialize({ dependencies: [ - // Cross-browser shim that fully implements classList - https://github.com/eligrey/classList.js/ - { src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } }, - // Interpret Markdown in
elements { src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, { src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, diff --git a/demo.html b/demo.html index 04b47d2..71f0c4c 100644 --- a/demo.html +++ b/demo.html @@ -399,7 +399,6 @@ Reveal.addEventListener( 'customevent', function() { // More info https://github.com/hakimel/reveal.js#dependencies dependencies: [ - { src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } }, { src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, { src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, { src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }, diff --git a/lib/js/classList.js b/lib/js/classList.js deleted file mode 100644 index 44f2b4c..0000000 --- a/lib/js/classList.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/ -if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(j){var a="classList",f="prototype",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p